It's been quite awhile since I coded this kind of thing, but, as I recall, the call to make once you have retrieved the IWbemServices pointer from IWbemLocator::ConnectServer is, IWbemServices::ExecQuery[^]. Are you getting WBEM_E_ACCESS_DENIED from GetObject? If so, you will probably get the same thing from IWbemServices::ExecQuery.
I am tring to getpath of shortcut.I can do it for normal shortcut but in case of internet Explorer shortcut I am unable to find out path and icon.
i am using IShellLink .GetPath(...);
plz help me for internet explorer.
in my project there is a function called ExportandZip().it is working normally in debug mode.but in relese mode it is giving an error saying that "there is no source line for debugging information"what might be the reason.please let me know?
bmp.Attach((HBITMAP)hBitMap); // handle I got from LoadBitmap
int size = bitmap.bmHeight*bitmap.bmWidth*bitmap.bmBitsPixel/8;
BYTE *lpBits = new BYTE [ size ];
// Here i convert the image to byte array
// Here i get the handle to the picture control on my dialog
HWND hImage = this->GetDlgItem(IDC_STATIC_IMAGE)->GetSafeHwnd();
// I Call the following function to paint the converted byte array
SetRawBitsToImage (hImage,bitmap.bmWidth,bitmap.bmHeight,lpBits ,32);
//The defination of the above function is
// hwnd = handle to the image control
// W = width of the raw bits Image
// H = height of the raw bits Image
// lpBits = pointer to the raw bits image
// BitCount = 32,24 etc ( depend on the bit count ) defualt =32
void CMyTryImageDlg:: SetRawBitsToImage (HWND hwnd,int W,int H,BYTE *lpBits, int BitCount)
HDC hDC = ::GetDC(hwnd);
Actually inside SetRawBitsToImage (), there is SetDIBitsToDevice (), it must return no of rows scanned, but it returns zero, I tried with GetLastError (), but it returns zero, stating no error, i tried while debuggging to see the value od hdc , it stated "Unused:Expression cannot be solved"!!
I tried to run your code and see what happens (in a completely new dialog-based project) but for some reason if i try to load a bitmap either from resource or from file with LoadImage or LoadBitmap i get back NULL and zero for GetLastError or either "the parameter is incorrect" or "there is not enough storage to execute the requested command" (not literally quoted)... so anyways, you know you might get negative heights for a bitmap if it is stored upside-down, this nice feature can make one's life ...less enjoyable... so maybe try checking out the heights...
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
The first thing you need to do is learn how to ask a question with enough detail that someone can think about answering it. For example, what version of Visual Studio is the error from?
Secondly, you need to learn to use Google - the assertion that's failing is ASSERT(AfxGetThread() == NULL) (I have psychic debugging capability - don't ask). Googling[^] that leads to several pages indicating that a) you have more than one object derived from CWinApp, b) you're calling your application objects constructor multiple times, or c) you're using multiple MFC DLLs with inconsistent results.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p