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
Post a Comment