C# COM interop DLL in Excel VBA -


while trying build dll use in excel vba existing dll source got stuck in 1 of first steps.

the source looks this

using system; using system.runtime.interopservices; using system.text;  namespace zcon {      public class zconsts     {         #if __monocs__              public const string zlibrary = "zcon.so";         #else              public const string zlibrary = "zcon.dll";         #endif     }      public class zclient     {          [dllimport(zconsts.zlibrary)]         protected static extern int writeit(intptr client, int len, byte[] buffer);         public int writearea(int len, byte[] buffer)         {             return writeit(client, len, buffer);         }      }  } 

i'm not sure the 'dllimport' in relation namespace.

the assembly should com-visible , visual studio registers com interop. want register on system regasm.exe.

i've got framework/v4.0... , framwork64/v4.0..., 64-bit windows , x86-excel-2013.

first tried target system: cpu , registration regasm.exe works framework64 version ('types registered successfully').

regasm.exe zconcom.dll /codebase

also tried

regasm.exe zconcom.dll /tbl:zconcom.tbl /codebase

now want set reference within vba editor , dll tbl not displayed in windows/system32 (via 'browse' in 'references').

another attempt x86 target system in visual studio failed.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -