diff options
author | Werner Koch <[email protected]> | 2000-12-12 13:31:25 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2000-12-12 13:31:25 +0000 |
commit | edcc338a593d703335a98f39a44ff26307927458 (patch) | |
tree | 3ed5974c2f93de0b46c0962986e85efaeced38fa /complus/main.c | |
parent | Okay, it runs at least on Windows 95 (diff) | |
download | gpgme-edcc338a593d703335a98f39a44ff26307927458.tar.gz gpgme-edcc338a593d703335a98f39a44ff26307927458.zip |
Add a passphrase callback and minor changes to the interface
Diffstat (limited to 'complus/main.c')
-rw-r--r-- | complus/main.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/complus/main.c b/complus/main.c index 221a66b0..519d2bc6 100644 --- a/complus/main.c +++ b/complus/main.c @@ -28,6 +28,8 @@ #include <time.h> #include <windows.h> +#include "obj_base.h" + #include "argparse.h" #include "main.h" @@ -71,6 +73,9 @@ static ARGPARSE_OPTS opts[] = { { oEmbedding, "Embedding" , 0, "@" }, {0} }; + + + static const char * my_strusage( int level ) { @@ -258,30 +263,23 @@ enter_complus () { HANDLE running; int reg; - void *factory; + IClassFactory *factory; + CLSID clsid; - /* CoInitializeEx (NULL, COINIT_MULTITHREADED); */ + CoInitializeEx (NULL, COINIT_MULTITHREADED); running = CreateEvent (NULL, FALSE, FALSE, NULL ); - #if 0 - factory = create_class_factory (); - CoRegisterClassObject (CLSID_gpgme, factory, + factory = gnupg_factory_new ( &clsid ); + CoRegisterClassObject (&clsid, (IUnknown*)factory, CLSCTX_LOCAL_SERVER, - REGCLS_SUSPENDED|REGCLASS_MULTIPLEUSE, ® ); + REGCLS_SUSPENDED|REGCLS_MULTIPLEUSE, ® ); CoResumeClassObjects (); - #endif WaitForSingleObject ( running, INFINITE ); CloseHandle (running); - #if 0 CoRevokeClassObject ( reg ); - factory->release (); - CoUnitialize (); - #endif + gnupg_factory_release (factory); + CoUninitialize (); } - - - - |