Without the complete context to summarize:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <objbase.h>
using namespace std;
BYTE* StringToGUID(LPOLESTR szBuf)
{
GUID *g = (GUID *) malloc( sizeof(GUID));
HRESULT h2 = CLSIDFromString(szBuf, g);
return (BYTE*) g;
}
I Get:
1>Linking...
1>XorCryt.obj : error LNK2019: unresolved external symbol __imp__CLSIDFromString@8 referenced in function "unsigned char * __cdecl StringToGUID(wchar_t*)
(?StringToGUID@@YAPAEPA_W@Z)
1>C:\Users\Grace\Documents\Visual Studio 2008\XORCRYT\XORCRYT\Debug\XorCryt.exe
: fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\Grace\Documents\Visual Studio
2008\XORCRYT\XORCRYT\Debug\BuildLog.htm"
1>XorCryt - 2 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any Ideas? - Any help... I am getting ready to give up on this and try
do the hex to binary conversions myself, But if this worked it would be
nice. What am I missing? A library reference?
According to Microsoft Forum this code is supposed to work. I will continue
to look at it but if anyone has some practical experience that might be
helpful.... I can already generate the GUIDs that I need. I need to get
GUIDs entered by the user into binary form also. This seemed to be well
documented but it was hard to find the right include file and I am not
sure that that is enough.
Thanks again folks.. I *AM* learning... albeit slowly.