Skip to main content

[archive] Object reference not set to an instance of an object

  • September 26, 2007
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 25 September 2007]

I get the above error when I perform the following line of code

MODIFY OUTLOOK-ADD @SaveContacts(OUT-XML-STRING).

OUT-XML-STRING is just a variable containing information. It is not null.


I have created the Object before the SaveContacts line code using

CREATE ContactCreater HANDLE IN OUTLOOK-ADD (OUTLOOK-ADD USAGE IS HANDLE OF ContactCreater) (This does not give me an error and OUTLOOK-ADD is a numeric value)

Here is the DEF file

>>IMP(ACU-CBLFLAGS=-Sa)
* K:\\68\\work\\OUTLOOK.DEF - OLE object definitions for OutlookAddin
* Generated: Monday, September 24, 2007
OBJECT @OutlookAddin

* ContactCreater
CLASS @ContactCreater
CLSID, EF866FC1-20C8-4C9C-9934-8463F58476F4
NAME, "ContactCreater"
DEFAULT-INTERFACE, "ContactCreaterEvents"
* SaveContacts
METHOD, 2, @SaveContacts,
"BSTR" @pContactsXMLData, TYPE 8


Does anyone know why I am getting the error "Object reference not set to an instance of an object" when the SaveContacts line is performed?

2 replies

[Migrated content. Thread originally posted on 25 September 2007]

I get the above error when I perform the following line of code

MODIFY OUTLOOK-ADD @SaveContacts(OUT-XML-STRING).

OUT-XML-STRING is just a variable containing information. It is not null.


I have created the Object before the SaveContacts line code using

CREATE ContactCreater HANDLE IN OUTLOOK-ADD (OUTLOOK-ADD USAGE IS HANDLE OF ContactCreater) (This does not give me an error and OUTLOOK-ADD is a numeric value)

Here is the DEF file

>>IMP(ACU-CBLFLAGS=-Sa)
* K:\\68\\work\\OUTLOOK.DEF - OLE object definitions for OutlookAddin
* Generated: Monday, September 24, 2007
OBJECT @OutlookAddin

* ContactCreater
CLASS @ContactCreater
CLSID, EF866FC1-20C8-4C9C-9934-8463F58476F4
NAME, "ContactCreater"
DEFAULT-INTERFACE, "ContactCreaterEvents"
* SaveContacts
METHOD, 2, @SaveContacts,
"BSTR" @pContactsXMLData, TYPE 8


Does anyone know why I am getting the error "Object reference not set to an instance of an object" when the SaveContacts line is performed?
Can you post the .def file also?

[Migrated content. Thread originally posted on 25 September 2007]

I get the above error when I perform the following line of code

MODIFY OUTLOOK-ADD @SaveContacts(OUT-XML-STRING).

OUT-XML-STRING is just a variable containing information. It is not null.


I have created the Object before the SaveContacts line code using

CREATE ContactCreater HANDLE IN OUTLOOK-ADD (OUTLOOK-ADD USAGE IS HANDLE OF ContactCreater) (This does not give me an error and OUTLOOK-ADD is a numeric value)

Here is the DEF file

>>IMP(ACU-CBLFLAGS=-Sa)
* K:\\68\\work\\OUTLOOK.DEF - OLE object definitions for OutlookAddin
* Generated: Monday, September 24, 2007
OBJECT @OutlookAddin

* ContactCreater
CLASS @ContactCreater
CLSID, EF866FC1-20C8-4C9C-9934-8463F58476F4
NAME, "ContactCreater"
DEFAULT-INTERFACE, "ContactCreaterEvents"
* SaveContacts
METHOD, 2, @SaveContacts,
"BSTR" @pContactsXMLData, TYPE 8


Does anyone know why I am getting the error "Object reference not set to an instance of an object" when the SaveContacts line is performed?
Can you post the .def file also?