VC6 BUG 乎?
这段代码在DEBUG下结果正常,在RELEASE下没结果?
#include "stdafx.h"
#include "stdio.h"
#include "windows.h"
int main(int argc, char* argv[])
{
HKEY hKey;
char szProductType[80] = {0};
long dwBufLen;
RegOpenKeyEx( HKEY_CLASSES_ROOT,"CLSID\\{000C101C-0000-0000-C000-000000000046}\\ProgId",0, KEY_QUERY_VALUE, &hKey );
RegQueryValue(hKey , NULL , szProductType , &dwBufLen);
RegCloseKey(hKey);
printf(szProductType);
printf("\n");
return 0;
}