I did what you suggest : the return value of SafeArrayGetElement is S_OK v1.vt = 0x95d4 I have seen a VB example using this GetAllProperties method, and there they simply access it with names(i), and treat it as a string ( it stands for a Property Name ) How can I translate this into C++ ?
LindeA
Posts
-
How to read the contents of a VARIANT ? -
How to read the contents of a VARIANT ?Hi, I can not find out how to read what is in a VARIANT, which is the result of calling a method GetAllProperties. The doc of this method only specifies that a VARIANT is returned. It should contain some kind of strings. I tried this : VARIANT names; _variant_t v1; VARTYPE vtype; long ix; ... x->GetAllProperties(&names); if (V_ISARRAY(&names)) { SafeArrayGetVartype(names.parray,&vtype); // this returns 0x0800 in vtype, so I assume it is an array of _variant_t !!! for (ix=0;ix
-
Unable to use SetDllDirectory call in VS2005 - C++Resolved -------- I changed the order of the numerous #include lines : I put the #include "windows.h" as the first, and now it works.
-
Unable to use SetDllDirectory call in VS2005 - C++No, I don't think so. The libs in the VC directory are more recent than the ones I find in the latest SDK update ( = from 2004 ! )
-
Unable to use SetDllDirectory call in VS2005 - C++Hi, I try to use SetDllDirectory call, but fail to compile. Platform = WinXP SP2 ; VS2005 SP1 #define _WIN32_WINNT 0x0502 #include "windows.h" <...> SetDllDirectory(NULL); results in error C3861: 'SetDllDirectory': identifier not found When I literally copy the defs from winbase.h like this : #include "windows.h" // ( for SetDllDirectory call ) WINBASEAPI BOOL WINAPI SetDllDirectoryA( __in_opt LPCSTR lpPathName ); #define SetDllDirectory SetDllDirectoryA it compiles ok, but results in an unresolved external error LNK2019: unresolved external symbol "__declspec(dllimport) int __stdcall SetDllDirectoryA(char const *)" However, I do add kernel32.lib to the linker input. How should I use this api then ? Thanks in advance Linde