Click here to Skip to main content
15,891,375 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionUsing multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 9:04
jonsey298473-Mar-08 9:04 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 9:33
Mark Salsbery3-Mar-08 9:33 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 11:28
jonsey298473-Mar-08 11:28 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 11:38
Mark Salsbery3-Mar-08 11:38 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 11:56
jonsey298473-Mar-08 11:56 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 12:05
Mark Salsbery3-Mar-08 12:05 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 13:32
jonsey298473-Mar-08 13:32 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 14:02
Mark Salsbery3-Mar-08 14:02 

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.