Click here to Skip to main content
15,912,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I add a button on title bar of a window which is create by other process Pin
NiceNaidu25-Jul-06 23:16
NiceNaidu25-Jul-06 23:16 
AnswerRe: How can I add a button on title bar of a window which is create by other process [modified] Pin
see me25-Jul-06 23:24
see me25-Jul-06 23:24 
Questiondisplay text transparently by DC Pin
includeh1025-Jul-06 22:31
includeh1025-Jul-06 22:31 
AnswerRe: display text transparently by DC Pin
Arman S.25-Jul-06 22:50
Arman S.25-Jul-06 22:50 
GeneralRe: display text transparently by DC Pin
includeh1026-Jul-06 0:30
includeh1026-Jul-06 0:30 
GeneralRe: display text transparently by DC Pin
Hamid_RT26-Jul-06 1:27
Hamid_RT26-Jul-06 1:27 
AnswerRe: display text transparently by DC Pin
Hamid_RT26-Jul-06 1:21
Hamid_RT26-Jul-06 1:21 
QuestionRuntime DLL calling with any parameters Pin
hunter1325-Jul-06 22:27
hunter1325-Jul-06 22:27 
Hello I would like to call DLL function with any parameters specified on runtime (some kind of rundll32 Smile | :) ) Input is ini file

[DllCall]
DllName=User32.dll
DllFunction=MessageBoxA
Parameters=4
Parameter1=0
Parameter2="Hello!"
Parameter3="Title!"
Parameter4=0


I would like to: 1) don't specify in my c++ all API I would like to callin future (its brr Smile | :) )
2) best wihout no inline, during it's not supported by Vc++ 2005 x64 compilier
(yes its possible to use external asm file in x64)

My problem is knowledge as well: I don't know how I call with any parameters (best would be something like function AddParameter(...) )

here some tutorial code Smile | :)

int main(int argc, char* argv[])
{
	typedef PULONG (*LP)(...);
	LP lp;

	HMODULE m;
	m = LoadLibraryA("user32.dll");
	lp = (LP)GetProcAddress(m, "MessageBoxA");

	/*
	  int, char *, char*, int
	*/

	lp();
	
	FreeLibrary(m);
	return 0;
}



Such method I did (useless)
int main(int argc, char* argv[])
{
	DWORD aint = 0;
	char someTxt[50] = "Hello!";

	HINSTANCE dlScope = LoadLibraryA("user32.dll");
	FARPROC rFunction = GetProcAddress(dlScope, "MessageBoxA");

	DWORD outPnt;

	__asm {
		push aint

		lea	 eax, someTxt
		push eax

		lea	 eax, someTxt
		push eax

		push aint

		call rFunction
		mov	outPnt, eax
	}

	FreeLibrary(dlScope);
	printf("%d", outPnt);

	return 0;
}

AnswerRe: Runtime DLL calling with any parameters Pin
Cedric Moonen25-Jul-06 23:00
Cedric Moonen25-Jul-06 23:00 
GeneralRe: Runtime DLL calling with any parameters [modified] Pin
hunter1326-Jul-06 0:42
hunter1326-Jul-06 0:42 
GeneralRe: Runtime DLL calling with any parameters Pin
Cedric Moonen26-Jul-06 1:15
Cedric Moonen26-Jul-06 1:15 
QuestionCAsyncSocket ::OnReceive() missed calls Pin
neilsolent25-Jul-06 21:31
neilsolent25-Jul-06 21:31 
AnswerRe: CAsyncSocket ::OnReceive() missed calls Pin
Steve S25-Jul-06 21:52
Steve S25-Jul-06 21:52 
GeneralRe: CAsyncSocket ::OnReceive() missed calls Pin
neilsolent25-Jul-06 22:57
neilsolent25-Jul-06 22:57 
GeneralRe: CAsyncSocket ::OnReceive() missed calls Pin
Moak4-Oct-06 5:09
Moak4-Oct-06 5:09 
GeneralRe: CAsyncSocket ::OnReceive() missed calls Pin
neilsolent5-Oct-06 8:05
neilsolent5-Oct-06 8:05 
QuestionGetVersionOfFile(); Pin
ningthemcha25-Jul-06 21:20
ningthemcha25-Jul-06 21:20 
QuestionRe: GetVersionOfFile(); Pin
see me25-Jul-06 21:28
see me25-Jul-06 21:28 
AnswerRe: GetVersionOfFile(); Pin
NiceNaidu25-Jul-06 21:31
NiceNaidu25-Jul-06 21:31 
GeneralRe: GetVersionOfFile(); Pin
Steve S25-Jul-06 21:45
Steve S25-Jul-06 21:45 
QuestionWhat happens when an Object of CWinApp derived Class is Created in MFC Pin
NiceNaidu25-Jul-06 20:14
NiceNaidu25-Jul-06 20:14 
AnswerRe: What happens when an Object of CWinApp derived Class is Created in MFC Pin
NiceNaidu25-Jul-06 21:33
NiceNaidu25-Jul-06 21:33 
AnswerRe: What happens when an Object of CWinApp derived Class is Created in MFC Pin
NiceNaidu25-Jul-06 21:34
NiceNaidu25-Jul-06 21:34 
GeneralRe: What happens when an Object of CWinApp derived Class is Created in MFC Pin
Steve S25-Jul-06 21:50
Steve S25-Jul-06 21:50 
GeneralRe: What happens when an Object of CWinApp derived Class is Created in MFC Pin
NiceNaidu25-Jul-06 22:46
NiceNaidu25-Jul-06 22:46 

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.