I am attempting to write a program, in C#, that converts some COM DLLs to Interop DLLs (following the instructions in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemRuntimeInteropServicesTypeLibConverterClassConvertTypeLibToAssemblyTopic.
asp).
However, when I compile their code fragment, I get the following error :
"error CS0234: The type or namespace name 'LoadTypeLibEx' does not exist in the class or namespace 'ConvertCOMLibraries' (are you missing an assembly reference?)"
In other words, the [DLLImport("oleaut32.dll"... statement has no effect, and a reference cannot be made in the conventional sense to \windows\system32\oleaut32.dll, as this produces the following error :
A reference to c:\windows\system32\oleaut32.dll could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' and COM components can be referenced...
Please help?
Phil Wilson - 14 Aug 2004 19:54 GMT
Are you using this?
[ DllImport( "oleaut32.dll", CharSet = CharSet.Unicode, PreserveSig =
false )]

Signature
Phil Wilson
[MVP Windows Installer]
I am attempting to write a program, in C#, that converts some COM DLLs to
Interop DLLs (following the instructions in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemRuntimeInteropServicesTypeLibConverterClassConvertTypeLibToAssemblyTopic.
asp).
However, when I compile their code fragment, I get the following error :
"error CS0234: The type or namespace name 'LoadTypeLibEx' does not exist in
the class or namespace 'ConvertCOMLibraries' (are you missing an assembly
reference?)"
In other words, the [DLLImport("oleaut32.dll"... statement has no effect,
and a reference cannot be made in the conventional sense to
\windows\system32\oleaut32.dll, as this produces the following error :
A reference to c:\windows\system32\oleaut32.dll could not be added. This is
not a valid assembly or COM component. Only assemblies with extension 'dll'
and COM components can be referenced...
Please help?