HRESULTs from IVPage, IVShape, etc Calls

D

Dave

We are using VC++ and COM interfaces to access the Visio API. However, in
some cases the calls fail and the HRESULTs we get back don't have any meaning
when we use "Error Lookup" in 2003 dev studio.

Currently we are chasing a problem where IVPage->Drop is failing. The error
we are getting back is -2032465763

Do you know what we need to do to find out the meaning of the error code
returned from these Visio API calls?
 
C

Chris Roth [MVP]

Hi Dave,

I'm worthless with C++, but can look for suspicious things at least.

What are you dropping? Any chance you're dropping a master that belongs to a
locked layer???

--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio
 
P

Paul Herber

We are using VC++ and COM interfaces to access the Visio API. However, in
some cases the calls fail and the HRESULTs we get back don't have any meaning
when we use "Error Lookup" in 2003 dev studio.

Currently we are chasing a problem where IVPage->Drop is failing. The error
we are getting back is -2032465763

Do you know what we need to do to find out the meaning of the error code
returned from these Visio API calls?

Are you sure that HRESULTs are the correct type? Most Visio API calls
return a Visio object of some sort, in the case of Drop it should
return a Shape object.
 
D

Dave

I really just need to know what the HRESULT means. The case is a lot more
complicated than I've laid out here and it would be impossible to describe in
a newsgroup. But the call works in one case but not in another case using
the same drop object.

In any case, we've run into a few situations where the COM calls return an
error code and it would be really helpful if we could find out what it means.
It would give us a direction to go in when we are debugging problems. Also,
all the COM calls return HRESULTs. You can't return anything but an HRESULT
through COM.

HRESULT STDMETHODCALLTYPE Drop(
/* [in] */ IUnknown *ObjectToDrop,
/* [in] */ double xPos,
/* [in] */ double yPos,
/* [retval][out] */ IVShape **lpdispRet)
 
M

Mark Nelson [MS]

HRESULT is a standard Windows type. Here is the information from MSDN:

Common HRESULT Values
The following HRESULT values are the most common. More values are contained
in the header file Winerror.h.

Name Description Value
S_OK Operation successful 0x00000000
E_ABORT Operation aborted 0x80004004
E_ACCESSDENIED General access denied error 0x80070005
E_FAIL Unspecified failure 0x80004005
E_HANDLE Invalid handle 0x80070006
E_INVALIDARG One or more arguments are invalid 0x80070057
E_NOINTERFACE No such interface supported 0x80004002
E_NOTIMPL Not implemented 0x80004001
E_OUTOFMEMORY Failed to allocate necessary memory 0x8007000E
E_POINTER Invalid pointer 0x80004003
E_UNEXPECTED Unexpected failure 0x8000FFFF

I would check out the error value in hex in the debugger to see what it
matches with.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Dave said:
I really just need to know what the HRESULT means. The case is a lot more
complicated than I've laid out here and it would be impossible to describe
in
a newsgroup. But the call works in one case but not in another case using
the same drop object.

In any case, we've run into a few situations where the COM calls return an
error code and it would be really helpful if we could find out what it
means.
It would give us a direction to go in when we are debugging problems.
Also,
all the COM calls return HRESULTs. You can't return anything but an
HRESULT
through COM.

HRESULT STDMETHODCALLTYPE Drop(
/* [in] */ IUnknown *ObjectToDrop,
/* [in] */ double xPos,
/* [in] */ double yPos,
/* [retval][out] */ IVShape **lpdispRet)


Chris Roth said:
Hi Dave,

I'm worthless with C++, but can look for suspicious things at least.

What are you dropping? Any chance you're dropping a master that belongs
to a
locked layer???

--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio
 
D

Dave

The HRESULTs we get back from Visio don't map to any of these error codes.
"Error Lookup" in dev studio would tell us what the error was if it did. It
looks like Visio has it's own set of error codes and we need to find out what
they mean.

We have looked all through the MSDN website and on the internet and haven't
found anything. We have also looked through the books "Visio 2003
Developer's Survival Pack" and "Deleoping Microsoft Visio Solutions". The
problem is there isn't much information on the Visio COM interfaces.
However, these error codes have to be documented somewhere.

The error code we are getting back in this case is 0x86DB089D. Which
doesn't map to anything in Winerror.h.



Mark Nelson said:
HRESULT is a standard Windows type. Here is the information from MSDN:

Common HRESULT Values
The following HRESULT values are the most common. More values are contained
in the header file Winerror.h.

Name Description Value
S_OK Operation successful 0x00000000
E_ABORT Operation aborted 0x80004004
E_ACCESSDENIED General access denied error 0x80070005
E_FAIL Unspecified failure 0x80004005
E_HANDLE Invalid handle 0x80070006
E_INVALIDARG One or more arguments are invalid 0x80070057
E_NOINTERFACE No such interface supported 0x80004002
E_NOTIMPL Not implemented 0x80004001
E_OUTOFMEMORY Failed to allocate necessary memory 0x8007000E
E_POINTER Invalid pointer 0x80004003
E_UNEXPECTED Unexpected failure 0x8000FFFF

I would check out the error value in hex in the debugger to see what it
matches with.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Dave said:
I really just need to know what the HRESULT means. The case is a lot more
complicated than I've laid out here and it would be impossible to describe
in
a newsgroup. But the call works in one case but not in another case using
the same drop object.

In any case, we've run into a few situations where the COM calls return an
error code and it would be really helpful if we could find out what it
means.
It would give us a direction to go in when we are debugging problems.
Also,
all the COM calls return HRESULTs. You can't return anything but an
HRESULT
through COM.

HRESULT STDMETHODCALLTYPE Drop(
/* [in] */ IUnknown *ObjectToDrop,
/* [in] */ double xPos,
/* [in] */ double yPos,
/* [retval][out] */ IVShape **lpdispRet)


Chris Roth said:
Hi Dave,

I'm worthless with C++, but can look for suspicious things at least.

What are you dropping? Any chance you're dropping a master that belongs
to a
locked layer???

--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio

We are using VC++ and COM interfaces to access the Visio API. However,
in
some cases the calls fail and the HRESULTs we get back don't have any
meaning
when we use "Error Lookup" in 2003 dev studio.

Currently we are chasing a problem where IVPage->Drop is failing. The
error
we are getting back is -2032465763

Do you know what we need to do to find out the meaning of the error
code
returned from these Visio API calls?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top