Execute following commands on Visual Studio command prompt: 1) Compile and link your Automation Server CPP file: Compile: cl.exe /c /EHsc AutomationServerWithRegFile.cpp Link: link.exe AutomationServerWithRegFile.obj user32.lib gdi32.lib oleaut32.lib /DLL /DEF:AutomationServerWithRegFile.def /SUBSYSTEM:WINDOWS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2) Create your IDL file and compile it with MIDL: MIDL: midl /h AutomationProxyStubHeader.h /iid AutomationProxyStubGuids.c /dlldata AutomationProxyStubDllData.c /proxy AutomationProxyStub.c AutomationServerTypeLib.idl This will generate 3 .c files, 1.h file and 1 Type library(.tlb) file. ------------------------------------------------------------ 3) Create Automation Server Proxy Stub DLL: Use output of above MIDL command(3 .c files, 1 .h file) and create a .def file with 5 functions exported as instructed by sir. Compile: cl.exe /c /EHsc AutomationProxyStub.c AutomationProxyStubDllData.c AutomationProxyStubGuids.c /D "REGISTER_PROXY_DLL" /D "WIN32" Note: /D switch for Preprocessor definition macros ------------------------------------------------------------ Link: link.exe AutomationProxyStub.obj AutomationProxyStubDllData.obj AutomationProxyStubGuids.obj user32.lib gdi32.lib oleaut32.lib rpcns4.lib rpcrt4.lib /DLL /DEF:AutomationServerTypeLibDll.def /SUBSYSTEM:WINDOWS Note: extra lib files oleaut32.lib rpcns4.lib rpcrt4.lib Single command to compile and link: cl.exe /EHsc AutomationProxyStub.c AutomationProxyStubDllData.c AutomationProxyStubGuids.c /D "REGISTER_PROXY_DLL" /D "WIN32" /link user32.lib gdi32.lib oleaut32.lib rpcns4.lib rpcrt4.lib /DLL /OUT:"AutomationServerTypeLibDll.dll" /DEF:AutomationServerTypeLibDll.def /SUBSYSTEM:WINDOWS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Refer sir's instructions for VB and C# clients. Following are the same commands given by sir. They are just added here for quick reference. i) Import Type Library to create DLL for .net clients: tlbimp C:\windows\system32\AutomationServerTypeLib.tlb /out:.\AutomationServerTypeLibForDotNet.dll ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ii) Compile and link VB Client: vbc.exe /t:winexe /r:Microsoft.VisualBasic.dll /r:AutomationServerTypeLibForDotNet.dll VBAutomation.vb ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- iii) Compile and link C# client: Use same DLL(generated in Type Library import) for C# also. csc.exe /r:AutomationServerTypeLibForDotNet.dll CSharpAutomation.cs