Windows error 0x80020008, -2147352568

Detailed Error Information

DISP_E_BADVARTYPE[1]

MessageBad variable type.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode2 (0x002)
NameFACILITY_DISPATCH[2][1]
DescriptionThe source of the error code is a COM Dispatch.[2][1]
Error Code8 (0x0008)

Questions

3votes
2answers

Can I pass a HWND in a COM method?

Is it possible to have a COM method which passes a HWND? With the following method in my object CoCreateInstance returns DISP_E_BADVARTYPE (0x80020008): STDMETHODIMP ShowDialog(HWND hWndParent); So far, I'm getting round this problem by passing an OLE_HANDLE then casting it but it feels like a cludge: STDMETHODIMP ShowDialog(OLE_HANDLE hWndParent); read more
windows
com
hwnd
2votes
1answer

VarCmp returning 0x80020008 (Bad variable type)

I'm trying to compare two VARIANT values in VC++ using the VarCmp function: VARIANT a; VariantInit(&a); a.vt = VT_UINT; a.uintVal = 32; VARIANT b; VariantInit(&b); b.vt = VT_UINT; b.uintVal = 32; HRESULT hr = VarCmp(&a, &b, LOCALE_USER_DEFAULT); I expected VarCmp to return VARCMP_EQ but it's actually returning 0x80020008, "Bad variable [...] read more
visual-c++
variant
hresult
1vote
1answer

Calling C++ COM-server function from C# client

Looking for a help with com server on C++. Here is C# client code to invoke method: public static object ComInvoke(string method, params object[] args) { return _comObj.GetType().InvokeMember(method, BindingFlags.InvokeMethod, Type.DefaultBinder, _comObj, args); } This is how I call it: string[] result = (string[])ExplorerCore.ComInvoke("CopyFiles", new object[]{"arg1_1", "arg1_2"}, "arg2"); I always get [...] read more
arrays
string
com
client-server
idl
1vote
0answers

MS-Word API method Find.HitHighlight is throwing exception

i am trying to find and highlight text in word file progrramatically but when the line bool highlighted = range.Find.HitHighlight execute then a exception is occuring and the exception message is Bad variable type. (Exception from HRESULT: 0x80020008 (DISP_E_BADVARTYPE)) i am not being able to find out the reason what [...] read more
c#
ms-word
find
highlight
1vote
1answer

How do I read a MSSQL DateTimeOffset column in a Visual C++ application?

I have an Visual C++ (MFC) application using ADO to access a Microsoft SQL Server database. I'd like to start using DateTimeOffset columns but I'm getting an exception. Here's a code snippet: HRESULT hRes = pRecordset.CreateInstance(__uuidof(Recordset)); FieldPtr fieldPtr = pRecordset->Fields->GetItem(bstrFieldName); DataTypeEnum type = fieldPtr->Type; _variant_t vFieldValue = fieldPtr->Value; Assigning Value [...] read more
sql-server
visual-c++
ado
datetimeoffset
0votes
2answers

How to get derived interface without having a property/function that returns it (OLE/COM)

I'm interfacing with a VB application using a C++ client code. I'm totally a novice in this (I'm just a Chemical Engineer), so please excuse me if the question is dumb. So the following code in VB is required to access "BackDoor" interface, I can get all other interfaces because [...] read more
c++
vb.net
com
0votes
0answers

Error while accessing DLL interface from Web Application

I have made one windows Form application in C#. I have added one DLL reference in that application and called method of that DLL. Its working fine. But when I have made web application and added reference of same DLL and tried to run then I am getting error as [...] read more
c#
asp.net
windows
dll
0votes
1answer

Invoke Workflow through Custom Sequential Workflow in SharePoint

I've created a SharePoint 2007 Sequential Workflow and am trying to activate two workflows (one approval and one feedback) programmatically. workflowProperties.Site.WorkflowManager.StartWorkflow(workflowProperties.Item, association, association.AssociationData, true); I use this code to start the work flow and the association is created on the fly. The problem arises when I am trying to access [...] read more
c#
sharepoint
workflow
workflow-foundation

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0