Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to do this code? Pin
David Crow4-Mar-08 2:45
David Crow4-Mar-08 2:45 
GeneralGraph Pin
Chandrasekharan P3-Mar-08 17:21
Chandrasekharan P3-Mar-08 17:21 
QuestionHow to Convert HDC to CDC? Pin
TooShy2Talk3-Mar-08 14:49
TooShy2Talk3-Mar-08 14:49 
GeneralRe: How to Convert HDC to CDC? Pin
zzangcorea3-Mar-08 14:53
zzangcorea3-Mar-08 14:53 
GeneralRe: How to Convert HDC to CDC? Pin
Stephen Hewitt3-Mar-08 15:30
Stephen Hewitt3-Mar-08 15:30 
NewsRe: How to Convert HDC to CDC? Pin
Rajkumar R5-Mar-08 19:16
Rajkumar R5-Mar-08 19:16 
GeneralRe: How to Convert HDC to CDC? Pin
Stephen Hewitt3-Mar-08 15:32
Stephen Hewitt3-Mar-08 15:32 
GeneralRe: How to Convert HDC to CDC? Pin
led mike3-Mar-08 16:47
led mike3-Mar-08 16:47 
GeneralRe: How to Convert HDC to CDC? Pin
TooShy2Talk3-Mar-08 16:31
TooShy2Talk3-Mar-08 16:31 
GeneralRe: How to Convert HDC to CDC? Pin
ThatsAlok3-Mar-08 18:24
ThatsAlok3-Mar-08 18:24 
GeneralRe: How to Convert HDC to CDC? Pin
Hamid_RT3-Mar-08 20:58
Hamid_RT3-Mar-08 20:58 
GeneralExporting static member functions Pin
Wheatbread3-Mar-08 13:44
Wheatbread3-Mar-08 13:44 
GeneralRe: Exporting static member functions Pin
Mark Salsbery3-Mar-08 14:26
Mark Salsbery3-Mar-08 14:26 
GeneralRe: Exporting static member functions Pin
Wheatbread3-Mar-08 14:54
Wheatbread3-Mar-08 14:54 
GeneralRe: Exporting static member functions Pin
Cedric Moonen3-Mar-08 20:41
Cedric Moonen3-Mar-08 20:41 
GeneralRe: Exporting static member functions Pin
Mark Salsbery3-Mar-08 20:43
Mark Salsbery3-Mar-08 20:43 
hmm the only other thing I can see is make sure you don't define
_DEVLIBRARY_DLL in the project for the DLL doing the importing.

FWIW, I hardcoded this code into a DLL and an EXE project:
//////////////////////////////////////////////////////////////////////
// In the DLL

class __declspec(dllexport) CPSTDriverInterface
{
public:
static short GetCnlVarsCount();
static int *GetAllCnlVar(short var_rank);
static int *GetAllCnlVar(char *szProtVarName);
};
short CPSTDriverInterface::GetCnlVarsCount()
{
    return 3;
}
int *CPSTDriverInterface::GetAllCnlVar(short var_rank)
{
    return 0;
}
int *CPSTDriverInterface::GetAllCnlVar(char *szProtVarName)
{
    return 0;
}


//////////////////////////////////////////////////////////////////////
// In the EXE

class __declspec(dllimport) CPSTDriverInterface
{
public:
static short GetCnlVarsCount();
static int *GetAllCnlVar(short var_rank);
static int *GetAllCnlVar(char *szProtVarName);
};

int _tmain()
{
    short NumOfVars = CPSTDriverInterface::GetCnlVarsCount();
    return 0;
}
No problemo Smile | :)

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralFor curious Pin
Hamid_RT3-Mar-08 20:54
Hamid_RT3-Mar-08 20:54 
GeneralRe: For curious Pin
Mark Salsbery3-Mar-08 21:22
Mark Salsbery3-Mar-08 21:22 
Question[OT] Re: For curious Pin
David Crow4-Mar-08 2:46
David Crow4-Mar-08 2:46 
GeneralRe: [OT] Re: For curious Pin
Mark Salsbery4-Mar-08 5:18
Mark Salsbery4-Mar-08 5:18 
GeneralRe: For curious Pin
Hamid_RT4-Mar-08 4:11
Hamid_RT4-Mar-08 4:11 
GeneralRe: Exporting static member functions Pin
Wheatbread4-Mar-08 2:55
Wheatbread4-Mar-08 2:55 
GeneralRe: Exporting static member functions Pin
Mark Salsbery4-Mar-08 5:19
Mark Salsbery4-Mar-08 5:19 
GeneralRedistribution FIle for VS 2008 Pin
Tjie Pouw3-Mar-08 13:27
Tjie Pouw3-Mar-08 13:27 
GeneralRe: Redistribution FIle for VS 2008 Pin
uusheikh3-Mar-08 18:16
uusheikh3-Mar-08 18:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.