(DWORD)GetModuleHandleA(Textbox1->text) How Can I do this ?

Posts 1–15 of 16 · Page 1 of 2
(DWORD)GetModuleHandleA(Textbox1->text) How Can I do this ?
Hi, I have 1 textbox , 1 button and 1 timer.

when I press button1 my timer is on, I have one problems.

For example: DWORD modulehandle = (DWORD)GetModuleHandleA("game.exe");

I just want my textbox1->text = game.exe

(DWORD)GetModuleHandleA(textBox1->Text);

How can I do this ? for example My textbox1->text = "Hello" when I press button my timer on and GetModuleHandleA("Hello")

how can I do this ?
Code:
wchar_t buffer[MAX_PATH]; 
GetModuleFileName(hModule, buffer, MAX_PATH);
Uhm ye..
Quote Originally Posted by Biesi View Post
Code:
wchar_t buffer[MAX_PATH]; 
GetModuleFileName(hModule, buffer, MAX_PATH);
Uhm ye..
wchar_t buffer[textBox1->Text];
GetModuleFileName(hModule, buffer, MAX_PATH);

I have two errors.

1-> hModule is undefined
2-> expression must have a constant value (textbox1)
Quote Originally Posted by Biesi View Post
Code:
wchar_t buffer[MAX_PATH]; 
GetModuleFileName(hModule, buffer, MAX_PATH);
Uhm ye..
wchar_t buffer[textBox1->Text];
GetModuleFileName(hModule, buffer, MAX_PATH);

I have two errors.

1-> hModule is undefined
2-> expression must have a constant value (textbox1)
@OP What are you trying to do...?

GetModuleHandle() http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
Retrieves a module handle for the specified module. The module must have been loaded by the calling process.
That will look for "game.exe" loaded as a module inside YOUR PROCESS. Is the game loaded into your process?
Ohh, I just misunderstood your question..
For example: DWORD modulehandle = (DWORD)GetModuleHandleA("game.exe");

I just want my textbox1->text = game.exe
Did you try

modulehandle = (DWORD)GetModuleHandleA(textBox1->text);

Check the link posted for getmodulegandle....it expects a LPCTSTR and idk what ->text is .
Strings can be encoded a hundred different ways.
Quote Originally Posted by abuckau907 View Post
Did you try

modulehandle = (DWORD)GetModuleHandleA(textBox1->text);

Check the link posted for getmodulegandle....it expects a LPCTSTR and idk what ->text is .
Strings can be encoded a hundred different ways.
I TRY THIS : LPCSTR modulehandle = (DWORD)GetModuleHandleA(textBox1->Text);
I have two errors.
modulehandle undefined and Textbox1 : IntelliSense: argument of type "System::String ^" is incompatible with parameter of type "LPCSTR"

and I want to this for game, I make it before but I use thisDWORD)GetModuleHandleA("game.exe"); and it's working perfectly.

and wolfteam now have ney systems. csh..., My programs auto found csh and write to textbox, I want to (DWORD)GetModuleHandleA(textBox1->Text);
Code:
DWORD hModule = GetModuleHandle(textBox1->Text.c_str());
Maybe?
Quote Originally Posted by Biesi View Post
Code:
DWORD hModule = GetModuleHandle(textBox1->Text.c_str());
Maybe?
thanx for your answer, I try this now and I have a new errors:

IntelliSense: expression must have class type (textBox1)
Some body can help me ? I really really need this code please
Definition of Textbox1 ?
How can I do this, somebody please help me I really really need this code
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us