Click here to Skip to main content
15,893,486 members
Home / Discussions / COM
   

COM

 
GeneralRe: Access Denied in VC++ COM Pin
RevathiRamakumar30-Mar-09 23:16
RevathiRamakumar30-Mar-09 23:16 
GeneralRe: Access Denied in VC++ COM Pin
RevathiRamakumar30-Mar-09 23:56
RevathiRamakumar30-Mar-09 23:56 
AnswerRe: Access Denied in VC++ COM Pin
Roger Stoltz31-Mar-09 3:17
Roger Stoltz31-Mar-09 3:17 
QuestionRe: Access Denied in VC++ COM Pin
Roger Stoltz31-Mar-09 3:17
Roger Stoltz31-Mar-09 3:17 
AnswerRe: Access Denied in VC++ COM Pin
RevathiRamakumar31-Mar-09 18:32
RevathiRamakumar31-Mar-09 18:32 
GeneralRe: Access Denied in VC++ COM Pin
Roger Stoltz1-Apr-09 6:08
Roger Stoltz1-Apr-09 6:08 
GeneralRe: Access Denied in VC++ COM Pin
RevathiRamakumar1-Apr-09 18:11
RevathiRamakumar1-Apr-09 18:11 
QuestionRe: Access Denied in VC++ COM Pin
Roger Stoltz1-Apr-09 22:57
Roger Stoltz1-Apr-09 22:57 
RevathiRamakumar wrote:
HRESULT Of ::CoCreateInstance() returned 0 and the interface pointer points a valid address..But, again Access Denied while calling the server method...


That's odd...
If you're able to successfully create the server and get a valid pointer to the interface, I cannot see how you could get an access violation making the call.
It feels like there's some kind of mismatch between the server, typelib and client.
If you have changed from an IDispatch-derived interface to an IUnknown-derived, the virtual table the client tries to use may be out of sync. That's why I suggested that you should unregister all and rebuild from scratch.

How is your interface declared in the IDL-file?
It should be something like this:
[
    object,
    uuid( xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ),
    oleautomation,
    helpstring( "IGetStatus interface" ),
]
interface IGetStatus : IUnknown
{
    HRESULT GetBeat( [out] BSTR* pbstrTheBeat );
    HRESULT GetCPU( [out] unsigned long* pulCpuLoad );
    HRESULT GetMemory( [out] unsigned long* pulMemory );
};

Also make sure in the client that the IGetStatus interface, declared in the complier generated header file, only contains QueryInterface(), AddRef(), Release(), GetBeat(), GetCPU() and GetMemory().

Try using one of the other interface functions since it's more straight forward with integer values and you don't have to worry about string obscurities.
When you get that working you can continue with IGetStatus::GetBeat().


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


AnswerRe: Access Denied in VC++ COM Pin
RevathiRamakumar1-Apr-09 23:33
RevathiRamakumar1-Apr-09 23:33 
AnswerRe: Access Denied in VC++ COM Pin
RevathiRamakumar8-Apr-09 1:17
RevathiRamakumar8-Apr-09 1:17 
AnswerRe: Access Denied in VC++ COM Pin
Vi21-Apr-09 21:20
Vi21-Apr-09 21:20 
GeneralRe: Access Denied in VC++ COM Pin
RevathiRamakumar1-Apr-09 23:38
RevathiRamakumar1-Apr-09 23:38 
GeneralRe: Access Denied in VC++ COM [RESOLVED] Pin
RevathiRamakumar8-Apr-09 1:08
RevathiRamakumar8-Apr-09 1:08 
QuestionHow do I programmatically change the Configuration Permissions on a DCOM Object? Pin
raven8er27-Mar-09 0:32
raven8er27-Mar-09 0:32 
AnswerRe: How do I programmatically change the Configuration Permissions on a DCOM Object? Pin
«_Superman_»28-Mar-09 18:20
professional«_Superman_»28-Mar-09 18:20 
GeneralRe: How do I programmatically change the Configuration Permissions on a DCOM Object? Pin
raven8er29-Mar-09 22:35
raven8er29-Mar-09 22:35 
AnswerRe: How do I programmatically change the Configuration Permissions on a DCOM Object? Pin
raven8er29-Mar-09 22:34
raven8er29-Mar-09 22:34 
QuestionHelp with serial scanner to PC connection? Pin
TonyTrokodero26-Mar-09 9:05
TonyTrokodero26-Mar-09 9:05 
AnswerRe: Help with serial scanner to PC connection? Pin
«_Superman_»28-Mar-09 18:23
professional«_Superman_»28-Mar-09 18:23 
QuestionActiveX in IE Pin
Member 471608725-Mar-09 20:54
Member 471608725-Mar-09 20:54 
QuestionAsserting in afxwin1.inl Line: 29 Pin
vibindia24-Mar-09 20:57
vibindia24-Mar-09 20:57 
AnswerAlmost impossible to tell Pin
Baltoro29-Mar-09 10:55
Baltoro29-Mar-09 10:55 
QuestionCustomize context menu of Outlook Express Pin
Crazy Kiya re24-Mar-09 18:05
Crazy Kiya re24-Mar-09 18:05 
QuestionProblem calling C++ DLL from Excel Pin
gvanto24-Mar-09 16:10
gvanto24-Mar-09 16:10 
QuestionError Pin
boy_16097824-Mar-09 7:54
boy_16097824-Mar-09 7:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.