Re: Sample VC6 source not inspiring.... - WeOnlyDo Discussion board

Re: Sample VC6 source not inspiring.... (General questions)

by wodSupport, Friday, March 25, 2005, 10:08 (6983 days ago) @ yumcious

I'm working on it. If you're in a hurry, this is basic sample to initialize wodKeys, should be easy after this:
[code]#include <stdio.h>
#include <windows.h>
#include <objbase.h>

// import wodKeys
#import D:\WeOnlyDo\wodSFTP\Code\Code\KeyPair\Debug\wodKeys.dll no_namespace named_guids
#include Debug/wodKeys.tlh

#include <atlbase.h>
CComModule _Module; // dummy required to utilize atlcom.h
#include <atlcom.h>


int main(int argc, char *argv[])
{
IKeysPtr pKeys;

HRESULT hr = NULL;
CoInitialize (NULL);

hr = pKeys.CreateInstance (CLSID_Keys, NULL);
if (FAILED (hr))
{
_com_error comErr (hr);
printf ( Unable to load wodKeys interface.
Err # u: s , hr, comErr.ErrorMessage () );
CoUninitialize ();
return 99;
}


pKeys.Release();
CoUninitialize ();

return 0;
}
[/code]


Complete thread: