Click here to Skip to main content
15,924,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question Pin
messages13-Dec-06 19:53
messages13-Dec-06 19:53 
GeneralRe: Question Pin
prasad_som13-Dec-06 20:05
prasad_som13-Dec-06 20:05 
GeneralRe: Question Pin
Laxman Auti13-Dec-06 19:20
Laxman Auti13-Dec-06 19:20 
GeneralRe: Question Pin
messages13-Dec-06 19:28
messages13-Dec-06 19:28 
AnswerRe: Question Pin
prasad_som13-Dec-06 19:42
prasad_som13-Dec-06 19:42 
GeneralRe: Question Pin
Laxman Auti13-Dec-06 19:58
Laxman Auti13-Dec-06 19:58 
QuestionTextOut & True Type Fonts Pin
PsychicSmurf13-Dec-06 0:02
PsychicSmurf13-Dec-06 0:02 
QuestionCalling an function in a DLL Pin
JJeffrey12-Dec-06 23:59
JJeffrey12-Dec-06 23:59 
I'm sorry to disturb all of you, I feel like I'm missing something here.

I'm trying to use call a function in a DLL I have written and have so far done this:

DLL Side
int __stdcall Topo(LPSTR Param)<br />
{<br />
<code><br />
}


Calling Function side
typedef int (__stdcall * FuncPtr)(LPTSTR);<br />
<br />
int APIENTRY WinMain(HINSTANCE hInstance,<br />
                     HINSTANCE hPrevInstance,<br />
                     LPSTR     lpCmdLine,<br />
                     int       nCmdShow)<br />
{<br />
	HMODULE TopoPtr;<br />
	FuncPtr TopoFunc;<br />
	CHAR Output[50]={0};<br />
<br />
	if (TopoPtr = (HMODULE) LoadLibrary ("<location of DLL>") )<br />
	{		<br />
		TopoFunc  = (FuncPtr)GetProcAddress(TopoPtr, "Topo");<br />
		if ( TopoFunc && TopoPtr )<br />
		{<br />
			TopoFunc(<Params>);<br />
		}<br />
		FreeLibrary ( TopoPtr );<br />
	}<br />
<br />
	return 0;<br />
}


Export.def
LIBRARY CheckTopo<br />
EXPORTS<br />
     Topo	@1


The error is this: When I call TopoFunc, I get a stack overflow. Tracing it by stepping through, I find that the stack overflow occurs BEFORE I enter the code in the DLL Side. Is there something wrong with my calling of the function? Or is it nothing to do with that and that I should be looking at something else?
QuestionRe: Calling an function in a DLL Pin
prasad_som13-Dec-06 0:14
prasad_som13-Dec-06 0:14 
AnswerRe: Calling an function in a DLL Pin
JJeffrey13-Dec-06 14:21
JJeffrey13-Dec-06 14:21 
AnswerRe: Calling an function in a DLL Pin
ShilpiP13-Dec-06 0:52
ShilpiP13-Dec-06 0:52 
QuestionSetting a menu to OWNERDRAW Pin
manustone12-Dec-06 23:24
manustone12-Dec-06 23:24 
AnswerRe: Setting a menu to OWNERDRAW Pin
Mark Salsbery13-Dec-06 6:02
Mark Salsbery13-Dec-06 6:02 
AnswerRe: Setting a menu to OWNERDRAW Pin
Hamid_RT13-Dec-06 18:18
Hamid_RT13-Dec-06 18:18 
Questionhow can i get CLSID from ProgID in managed c++ Pin
Banks K12-Dec-06 23:19
Banks K12-Dec-06 23:19 
AnswerRe: how can i get CLSID from ProgID in managed c++ Pin
Laxman Auti13-Dec-06 20:10
Laxman Auti13-Dec-06 20:10 
QuestionMFC Pin
Bravoone_200612-Dec-06 23:12
Bravoone_200612-Dec-06 23:12 
AnswerRe: MFC Pin
David Crow13-Dec-06 5:41
David Crow13-Dec-06 5:41 
AnswerRe: MFC Pin
Hamid_RT13-Dec-06 18:12
Hamid_RT13-Dec-06 18:12 
Questionabout MFC Pin
rajaasif12-Dec-06 23:04
rajaasif12-Dec-06 23:04 
AnswerRe: about MFC Pin
Rajesh R Subramanian12-Dec-06 23:18
professionalRajesh R Subramanian12-Dec-06 23:18 
AnswerRe: about MFC Pin
ShilpiP12-Dec-06 23:45
ShilpiP12-Dec-06 23:45 
AnswerRe: about MFC Pin
Hamid_RT13-Dec-06 0:20
Hamid_RT13-Dec-06 0:20 
AnswerRe: about MFC Pin
Maximilien13-Dec-06 3:42
Maximilien13-Dec-06 3:42 
QuestionHow edit the formicon and -text Pin
b43r_3oo312-Dec-06 22:23
b43r_3oo312-Dec-06 22:23 

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.