Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / passing callback address to DLL

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. passing callback address to DLL
#5610
Posted by: 2004-12-17 04:51:55
Hi, I tried a search of forum, and search on Google and came up blank. Hopefully someone can help.

I am trying to call a function in a DLL. (The function is sqlite_create_function in SQLITE.DLL.)

Anyway, one of the parameters the function needs is the address of a function that the DLL can call when needed. sqlite will call the function with three parameters, all of type LONG.
 
From reading about Rapid-Q's function pointer feature, I doubt that it can used used by a DLL written in C.

So, is there a workaround? 

Thanks,
David
Message2. Re: passing callback address to DLL
#5616
Posted by: JohnK 2004-12-18 08:41:40
I didn't see any docs on "sqlite_create_function" on MSDN, but you should be able to send the CALLBACK address no problem --

SUB MySub
...
END SUB

A& = CODEPTR(MySUB)

sqlite_create_function(parm1&, parm2&, param3&,A&)

Should do it if you make sure POINTERS are POINTERS, and VALUES are VALUES...

-JohnK
I'm basic too
Message3. Re: passing callback address to DLL
#5623
Posted by: 2004-12-21 03:52:48
I missed the codeptr function. Thanks.

Now I just need to mock up a test to make sure that the callback function gets the correct parameters and can use them. It is a pain in the butt trying to use a char** in rapid-q.

David
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥470.00 ·
 
 
¥1,760.00 ·
 
 
¥1,390.00 ·
 
 
¥1,280.00 ·
 
 
¥470.00 ·
 
 
¥1,480.00 ·
© Sat 2024-11-9  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0