0

I have a problem Class not registered i try to browse here, here and here

but still no luck, here is my code

    using namespace RPTAInterface;

        HRESULT hr = CoInitialize(NULL);

        // Create the interface pointer.
        try
        {
            IModulePtr pI(__uuidof(RPTAModuleInterface));
        }
        catch(const _com_error& e)
        {
            e.ErrorMessage();

        }

and in my RPTAInterface.tlh here is the code

// Created by Microsoft (R) C/C++ Compiler Version 12.00.8168.0 (02baf1d3).
//
// RPTAInterface.tlh
//
// C++ source equivalent of Win32 type library .\RPTAInterface.tlb
// compiler-generated file created 01/08/15 at 17:23:29 - DO NOT EDIT!

#pragma once
#pragma pack(push, 8)

#include <comdef.h>

namespace RPTAInterface {

//
// Forward references and typedefs
//

struct __declspec(uuid("187807ec-0119-3b77-9f34-9122e5dc6895"))
/* dual interface */ IModule;
struct /* coclass */ RPTAModuleInterface;
struct __declspec(uuid("01b09ea4-4d58-3252-ba22-e2cf2e1e08ff"))
/* dual interface */ _RPTAModuleInterface;

//
// Smart pointer typedef declarations
//

_COM_SMARTPTR_TYPEDEF(IModule, __uuidof(IModule));
_COM_SMARTPTR_TYPEDEF(_RPTAModuleInterface, __uuidof(_RPTAModuleInterface));

//
// Type library items
//

struct __declspec(uuid("187807ec-0119-3b77-9f34-9122e5dc6895"))
IModule : IDispatch
{
    //
    // Raw methods provided by interface
    //

    virtual HRESULT __stdcall ShowEditPrevAVTool (
        BSTR strUser ) = 0;
 };

struct __declspec(uuid("d6134a6a-a08e-36ab-a4c0-c03c35aad201"))
RPTAModuleInterface;
// [ default ] interface _RPTAModuleInterface
// interface _Object
// interface IModule

struct __declspec(uuid("01b09ea4-4d58-3252-ba22-e2cf2e1e08ff"))
_RPTAModuleInterface : IDispatch
{};

} // namespace RPTAInterface

#pragma pack(pop)

Also, this is not my code, so i really don't understand what's the real meaning of this, i am just maintaining some old program. Hope to get answer soon

Community
  • 1
  • 1
Wielder
  • 156
  • 2
  • 15
  • i'll put bounty here after 2 days, so pls answer it.. – Wielder Jan 09 '15 at 03:39
  • 2
    You linked to an answer I wrote [here](http://stackoverflow.com/a/1785135/62576) that tells you **exactly** what you need to do to solve this problem. What part of those *very specific instructions* are you having difficulty understanding? You apparently know how to use the keyboard, or you couldn't have written this question. (Well, of course, unless it's actually not your question and someone else wrote it for you too, in which case you can ask *them* to read the linked answer and type in the necessary command.) – Ken White Jan 09 '15 at 03:48
  • i already said, that's not working, i don't have `RPTAInterface.dll` – Wielder Jan 09 '15 at 03:52
  • this is vc++6.0 not 2005 – Wielder Jan 09 '15 at 03:52
  • If you don't have `RPTAInterface.dll`, you can't use a class that it contains - that's common sense. It also doesn't matter what version of VC++ you're using, because no version can use a class from a COM DLL that does not exist. Either find the project containing that DLL's code and build it (if it's yours) or buy the product or library that does contain it and install it properly. – Ken White Jan 09 '15 at 04:01
  • my only file here are `RPTAInterface.dll.config`, `.tlh`,`.tlb` – Wielder Jan 09 '15 at 05:03
  • Then you need to locate the DLL. As I said before, you can't use a COM class from a DLL that you don't have, because that COM class has to be there. That should be relatively easy to understand, just as you can't eat steak if you have no steak or drive to the market if you have no access to a car. – Ken White Jan 09 '15 at 13:54

0 Answers0