How to import a namespace
-
Hi I have a dll file.But the interface is in dll also exist in oaidl.h file.Whenever i try to CreateInstance of the interface it recognise the .h file intreface. How can i resolve ambiguity. Can i use to namespace of dll file if yes please tell me how? Thanx in advance.
-
Hi I have a dll file.But the interface is in dll also exist in oaidl.h file.Whenever i try to CreateInstance of the interface it recognise the .h file intreface. How can i resolve ambiguity. Can i use to namespace of dll file if yes please tell me how? Thanx in advance.
I guess that you are talking of a COM-DLL and the
#import
directive. In this case you can use therename
attribute. If the COM-DLL already provides a namespace the attributerename-namespace
may be useful, too.Regards, Tim
-
I guess that you are talking of a COM-DLL and the
#import
directive. In this case you can use therename
attribute. If the COM-DLL already provides a namespace the attributerename-namespace
may be useful, too.Regards, Tim
-
If I remember correctly, the default namespace matches the name of the library. Use the "OLE/COM Object Viewer" (you find it in the Tools menu of Visual Studio), browse to the according Type Library and open it. Somewhere you will find something like:
[
...
]
library SERVERLib
{
...
}In this case
SERVERLib
will be the default namespace.Regards, Tim