C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-19-2008, 07:29 AM   #1
Ugly C Lover
 
audinue's Avatar
 
Join Date: Jun 2008
Location: Indonesia
Posts: 462
Interpreter Features Question

Hello guys!
Here I come with new problem,...

I'm stuck, I'm stuck, I'm stuck, Google can't help me anymore. *sob*

Btw, I have questions about dynamic function for interpreter that can interact with DLL.

1. How to call loaded DLL function with n parameter?

Code:
import long MessageBox as "MessageBoxA" (HWND hWnd, char *message ...) from "user32.dll";

MessageBox(0, "Hello world", "Test", 16);
Should I use assembly code for this?

Code:
push 0
push "Hello world"
push "Test"
push 16
call MessageBoxA
2. I need to make an interpreter that supports callback from DLL.
This means the interpreter should generate function pointers with n argument and pass it to the DLL function. For example: SetWindowsHookEx, SetWindowLong.

Code:
HRESULT OnActivate(HWND hWnd, ...)
{
  ...
}

SetWindowLong(frmMain.handle, GWL_WNDPROC, @OnActivate);
I absolutely have no idea on this one...

Please, if anyone have any reference for interpreter thing or dynamic function pointers... It might be help.

Thanks in advance.
audinue is offline   Reply With Quote
Reply

Tags
callback, dll, function

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about pointers #2 maxhavoc C++ Programming 28 06-21-2004 12:52 PM
Question... TechWins A Brief History of Cprogramming.com 16 07-28-2003 09:47 PM
opengl DC question SAMSAM Game Programming 6 02-26-2003 09:22 PM
Question about linked lists. cheeisme123 C++ Programming 6 02-25-2003 01:36 PM
Math Question, hard Yoshi A Brief History of Cprogramming.com 34 12-08-2001 11:58 AM


All times are GMT -6. The time now is 10:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22