c# dllimport question -


i iporting method external dll , have following code:

[dllimport("test.dll", charset = charset.unicode, setlasterror = true)]     public static extern tabpage creategui(); 

and call this:

tabcontrol1.tabpages.add(creategui()); 

i error saying creategui cannot located within dll. creategui method has been declared public , static within dll? ideas?

thanks.

if method returns tabpage .net method, hence .net assembly. should not import dllimport, add dll reference in project.

edit:
if want load .net assembly dynamically need load assembly.loadfile , find types assembly.gettypes.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -