Suppose we have: mysolution.sln in MS VS 2008, under which say we have 2 projects:
1) project1.vcproj - Here we have project1_file1.cpp, in which we have function defined:
doSomething(){ ... } 2) project2.vcproj - Say, here we have project2_file1.h and project2_file1.c. What I am trying to achieve in project2_file1.c is something like this, where:
myJumpTable_t myJumpTable = { doSomething }; I understand that we must have a struct defined somewhere:
typedef struct _myJumpTable_t { void (*doSomething)(); }myJumpTable_t; But I am not sure, where this must be declared? I am also aware that we must be using __declspec(dllimport), again I am not sure how to use this. Please help me with this. I am stuck with this issue from many days.
Thank you so much in advance.