wcglorioso
Programmer
ERROR DESCRIPTION (from Microsoft Visual FoxPro Language Reference - online VFP7 help):
OLE exception error "name". OLE object may be corrupt. (Error 1440)
A COM object or COM control caused a general protection fault, possibly because it was passed bad parameters. Release or reload the COM object or COM control.
I am using the Nokia PC Connectivity SDK version 2.1 downloaded from
I would like to create an application using VFP7 IDE and not the recommended programming IDEs (VB6,VC++6,Delphi) but
I am having trouble resolving the above error.
I see nothing wrong with my VB6 to VFP7 translation.
Please help me figure out what I have missed out.
Thanks for any help.
The following VB6 sample code is working as expected:
[01] ' VISUAL BASIC CODE (WORKING)
[02] Dim objSMS As SMS3ASuiteLib.SMS_SuiteAdapter
[03] Dim objMess As SMS3ASuiteLib.ShortMessage
[04]
[05] Dim CellNum As String
[06] Dim TextMesg As String
[07]
[08] CellNum = '353863982273'
[09] TextMesg = 'TESTING NOKIA DATA SUITE'
[10]
[11] If Len(CellNum) <> 0 And Len(TextMesg) <> 0 Then
[12] Set objSMS = New SMS3ASuiteLib.SMS_SuiteAdapter
[13] Set objMess = objSMS.CreateShortMsg
[14]
[15] objMess.UserDataText = TextMesg
[16] objMess.OtherEndAddress = CellNum
[17]
[18] Call objSMS.Send(objMess)
[19]
[20] Set objMess = Nothing
[21] objSMS.Terminate
[22] Set objSMS = Nothing
[23] Else
[24] If Len(CellNum) = 0 Then
[25]
[26] MsgBox "No Phone number has been entered, please enter in a phone number.", _
[27] vbCritical + vbOKOnly, _
[28] "Error Management System"
[29]
[30] End If
[31]
[32] If Len(TextMesg) = 0 Then
[33]
[34] MsgBox "No message exists, please enter in a message.", _
[35] vbCritical + vbOKOnly, _
[36] "Error Management System"
[37]
[38] End If
[39]
[40] End If
The following VFP7 code translation fires up the debugger at line [18] indicating an OLE error 1440:
Note that at line [13a], I assigned objMess to .NULL. to have its data type correctly regarded as an object and not a boolean (which is the case when I leave it as ease).
Note that at line [13b], I used the syntax based on the type library of the COM server I am using.
That is,
IDL:
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
VFP7:
CreateShortMsg(ppSMS as IShortMessage @) as VOID
Note that at line [], I used the syntax based on the type library of the COM server I am using.
That is,
IDL:
[helpstring("method Send"]
HRESULT _stdcall Send([in] IShortMessage* pSMS);
VFP7:
Send(pSMS as IShortMessage) as VOID
[01] * VISUAL FOXPRO TRANSLATION(WITH ERROR 1440)
[02] LOCAL objSMS As SMS3ASuiteLib.SMS_SuiteAdapter
[03] LOCAL objMess As SMS3ASuiteLib.ShortMessage
[04]
[05] LOCAL CellNum
[06] LOCAL TextMesg
[07]
[08] CellNum = '353863982273'
[09] TextMesg = 'TESTING NOKIA DATA SUITE'
[10]
[11] If Len(CellNum) # 0 And Len(TextMesg) # 0
[12] objSMS = CREATEOBJECTEX('SMSAdapter.SMSAdapter.1','','')
[13a] objMess = .NULL. && objMess is initially a boolean with value = .F.
[13b] objSMS.CreateShortMsg(@objMess)
[14]
[15] objMess.UserDataText = TextMesg
[16] objMess.OtherEndAddress = CellNum
[17]
[18] objSMS.Send(objMess)
[19]
[20] objMess = .NULL.
[21] objSMS.Terminate
[22] objSMS = .NULL.
[23] Else
[24] If Len(CellNum) = 0 Then
[25]
[26] MessageBox("No Phone number has been entered, please enter in a phone number.", ;
[27] 48 + 0, ;
[28] "Error Management System"
[29]
[30] EndIf
[31]
[32] If Len(TextMesg) = 0
[33]
[34] MessageBox("No message exists, please enter in a message.", ;
[35] 48 + 0, ;
[36] "Error Management System"
[37]
[38] EndIf
[39]
[40] EndIf
Here is the Type Library of the COM Server I am working on:
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: Sms3aS.dll
[
uuid(3369A2B7-E58F-11D1-B1FC-006097838405),
version(1.0),
helpstring("Nokia SMS Adapter (PC Suite 3.7)"
]
library SMS3ASuiteLib
{
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib("stdole2.tlb"
// Forward declare all types defined in this typelib
interface ISMSSend;
interface IShortMessage;
interface ISMSMemory;
interface ISMSSettings;
interface ISMSReceiveNotify;
interface IGraphicalMS;
interface IGMSPicture;
[
uuid(2E6EB774-804D-11D1-B1FC-006097838405),
helpstring("Nokia SMS (PC Suite 3.7)"
]
coclass SMS_SuiteAdapter {
[default] interface ISMSSend;
interface ISMSMemory;
interface ISMSSettings;
[default, source] interface ISMSReceiveNotify;
interface IGraphicalMS;
};
[
odl,
uuid(3369A2C4-E58F-11D1-B1FC-006097838405),
helpstring("ISMSSend Interface",
oleautomation
]
interface ISMSSend : IUnknown {
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
[helpstring("method Send"]
HRESULT _stdcall Send([in] IShortMessage* pSMS);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
[
odl,
uuid(3369A2C5-E58F-11D1-B1FC-006097838405),
helpstring("IShortMessage Interface",
oleautomation
]
interface IShortMessage : IUnknown {
[propget, helpstring("property ValidityPeriodFormat"]
HRESULT _stdcall ValidityPeriodFormat([out, retval] VALIDITY_PERIOD_FORMAT* pVal);
[propput, helpstring("property ValidityPeriodFormat"]
HRESULT _stdcall ValidityPeriodFormat([in] VALIDITY_PERIOD_FORMAT pVal);
[propget, helpstring("property ValidityPeriodRelative"]
HRESULT _stdcall ValidityPeriodRelative([out, retval] unsigned char* pVal);
[propput, helpstring("property ValidityPeriodRelative"]
HRESULT _stdcall ValidityPeriodRelative([in] unsigned char pVal);
[helpstring("method put_ValidityPeriodAbsolute"]
HRESULT _stdcall put_ValidityPeriodAbsolute(
[in] long year,
[in] long month,
[in] long day,
[in] long hour,
[in] long minute,
[in] long second,
[in] long timeZone);
[helpstring("method get_ValidityPeriodAbsolute"]
HRESULT _stdcall get_ValidityPeriodAbsolute(
[out] long* pYear,
[out] long* pMonth,
[out] long* pDay,
[out] long* pHour,
[out] long* pMinute,
[out] long* pSecond,
[out] long* pTimeZone);
[helpstring("method put_ValidityPeriodEnhanced"]
HRESULT _stdcall put_ValidityPeriodEnhanced(
[in] unsigned char functionalityIndicator,
[in] unsigned char byte2,
[in] unsigned char byte3,
[in] unsigned char byte4,
[in] unsigned char byte5,
[in] unsigned char byte6,
[in] unsigned char byte7);
[helpstring("method get_ValidityPeriodEnhanced"]
HRESULT _stdcall get_ValidityPeriodEnhanced(
[out] unsigned char* pFunctionalityIndicator,
[out] unsigned char* pByte2,
[out] unsigned char* pByte3,
[out] unsigned char* pByte4,
[out] unsigned char* pByte5,
[out] unsigned char* pByte6,
[out] unsigned char* pByte7);
[propget, helpstring("property DataCodingScheme"]
HRESULT _stdcall DataCodingScheme([out, retval] unsigned char* pVal);
[propput, helpstring("property DataCodingScheme"]
HRESULT _stdcall DataCodingScheme([in] unsigned char pVal);
[propget, helpstring("property OtherEndAddress"]
HRESULT _stdcall OtherEndAddress([out, retval] BSTR* pVal);
[propput, helpstring("property OtherEndAddress"]
HRESULT _stdcall OtherEndAddress([in] BSTR pVal);
[propget, helpstring("property ProtocolIdentifier"]
HRESULT _stdcall ProtocolIdentifier([out, retval] unsigned char* pVal);
[propput, helpstring("property ProtocolIdentifier"]
HRESULT _stdcall ProtocolIdentifier([in] unsigned char pVal);
[propget, helpstring("property SCAddress"]
HRESULT _stdcall SCAddress([out, retval] BSTR* pVal);
[propput, helpstring("property SCAddress"]
HRESULT _stdcall SCAddress([in] BSTR pVal);
[helpstring("method get_SCTimeStamp"]
HRESULT _stdcall get_SCTimeStamp(
[out] long* pYear,
[out] long* pMonth,
[out] long* pDay,
[out] long* pHour,
[out] long* pMinute,
[out] long* pSecond,
[out] long* pTimeZone);
[helpstring("method put_SCTimeStamp"]
HRESULT _stdcall put_SCTimeStamp(
[in] long year,
[in] long month,
[in] long day,
[in] long hour,
[in] long minute,
[in] long second,
[in] long timeZone);
[propget, helpstring("property StorageStatus"]
HRESULT _stdcall StorageStatus([out, retval] STORAGE_STATUS* pVal);
[propput, helpstring("property StorageStatus"]
HRESULT _stdcall StorageStatus([in] STORAGE_STATUS pVal);
[propget, helpstring("property MessageType"]
HRESULT _stdcall MessageType([out, retval] SMS_MESSAGE_TYPE* pVal);
[propput, helpstring("property MessageType"]
HRESULT _stdcall MessageType([in] SMS_MESSAGE_TYPE pVal);
[propget, helpstring("property UserDataFormat"]
HRESULT _stdcall UserDataFormat([out, retval] USER_DATA_FORMAT* pVal);
[propput, helpstring("property UserDataFormat"]
HRESULT _stdcall UserDataFormat([in] USER_DATA_FORMAT pVal);
[propget, helpstring("property UserDataText"]
HRESULT _stdcall UserDataText([out, retval] BSTR* pVal);
[propput, helpstring("property UserDataText"]
HRESULT _stdcall UserDataText([in] BSTR pVal);
[propget, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property MessageReference"]
HRESULT _stdcall MessageReference([out, retval] unsigned char* pVal);
[propput, helpstring("property MessageReference"]
HRESULT _stdcall MessageReference([in] unsigned char pVal);
[propget, helpstring("property StatusReportRequest"]
HRESULT _stdcall StatusReportRequest([out, retval] long* pVal);
[propput, helpstring("property StatusReportRequest"]
HRESULT _stdcall StatusReportRequest([in] long pVal);
[propget, helpstring("property ReplyPath"]
HRESULT _stdcall ReplyPath([out, retval] long* pVal);
[propput, helpstring("property ReplyPath"]
HRESULT _stdcall ReplyPath([in] long pVal);
[propget, helpstring("property CommandType"]
HRESULT _stdcall CommandType([out, retval] unsigned char* pVal);
[propput, helpstring("property CommandType"]
HRESULT _stdcall CommandType([in] unsigned char pVal);
[propget, helpstring("property CommandMessageNumber"]
HRESULT _stdcall CommandMessageNumber([out, retval] unsigned char* pVal);
[propput, helpstring("property CommandMessageNumber"]
HRESULT _stdcall CommandMessageNumber([in] unsigned char pVal);
[propget, helpstring("property StatusReportQualifier"]
HRESULT _stdcall StatusReportQualifier([out, retval] REPORT_QUALIFIER* pVal);
[propput, helpstring("property StatusReportQualifier"]
HRESULT _stdcall StatusReportQualifier([in] REPORT_QUALIFIER pVal);
[propget, helpstring("property Status"]
HRESULT _stdcall Status([out, retval] unsigned char* pVal);
[propput, helpstring("property Status"]
HRESULT _stdcall Status([in] unsigned char pVal);
[propget, helpstring("property UserDataLength"]
HRESULT _stdcall UserDataLength([out, retval] long* pVal);
[propput, helpstring("property UserDataLength"]
HRESULT _stdcall UserDataLength([in] long pVal);
[propget, helpstring("property UserDataHeaderLength"]
HRESULT _stdcall UserDataHeaderLength([out, retval] long* pVal);
[propput, helpstring("property UserDataHeaderLength"]
HRESULT _stdcall UserDataHeaderLength([in] long pVal);
};
typedef [uuid(F1D64502-176A-11D3-B1FF-006097838405), helpstring("SMS validity period type"]
enum {
NOT_PRESENT = 0,
RELATIVE_FORMAT = 1,
ENHANCED_FORMAT = 2,
ABSOLUTE_FORMAT = 3
} VALIDITY_PERIOD_FORMAT;
typedef [uuid(1577C341-174C-11D3-B1FF-006097838405), helpstring("SMS storage status type"]
enum {
NOT_SENT_FROM_PHONE = 0,
SENT_FROM_PHONE = 1,
DELIVERED = 2,
READ_FROM_PHONE = 3,
NOT_READ_FROM_PHONE = 4
} STORAGE_STATUS;
typedef [uuid(475AF0E5-14FD-11D3-B1FF-006097838405), helpstring("SMS message type"]
enum {
DELIVER_MESSAGE = 0,
STATUS_REPORT_MESSAGE = 1,
SUBMIT_MESSAGE = 2,
COMMAND_MESSAGE = 3,
MO_UNDEFINED_MESSAGE = 4,
MT_UNDEFINED_MESSAGE = 5
} SMS_MESSAGE_TYPE;
typedef [uuid(475AF0E3-14FD-11D3-B1FF-006097838405), helpstring("SMS user data coding format"]
enum {
DATA_CODING_SCHEME_BASED = 0,
DEFAULT_ALPHABET_7_BIT = 1,
DATA_8_BIT = 2,
UNICODE_16_BIT = 3
} USER_DATA_FORMAT;
typedef [uuid(475AF0E4-14FD-11D3-B1FF-006097838405), helpstring("Type of message that has requested Status Report"]
enum {
SUBMIT_REQUESTED = 0,
COMMAND_REQUESTED = 1
} REPORT_QUALIFIER;
typedef [uuid(60CC5E00-D3A2-11D1-99A0-0060979AC1B6), helpstring("Nokia adapter error codes"]
enum {
errCalendarNotSupported = 5377,
errCalendarUnknownNoteType = 5378,
errCalendarUnknownItemType = 5379,
errCalendarComponentCreation = 5380,
errCalendarItemRead = 5381,
errCalendarItemWrite = 5382,
errCalendarItemDelete = 5383,
errCalendarCallEmpty = 5384,
errCalendarNoMoreNotes = 5385,
errCalendarEmpty = 5386,
errCalendarNoDelete = 5387,
errCallNoActiveCall = 5633,
errCallNoDualModeCall = 5634,
errCallAlreadyActive = 5635,
errCallSignallingFailure = 5636,
errCallInvalidMode = 5637,
errCbSettingSetFailed = 5889,
errCbInvalidLanguage = 5890,
errCbInvalidTopic = 5891,
errCbToomanyLang = 5892,
errCbToomanyTopic = 5893,
errPnInvalidMemory = 6145,
errPnNumberTooLong = 6146,
errPnNameTooLong = 6147,
errPnInvalidCharacters = 6148,
errPnMemoryFull = 6149,
errPnNotAvail = 6150,
errPnTimestampNotavail = 6151,
errPnCallergroupsNotsupported = 6152,
errPnInvalidIconFormat = 6153,
errPnEntryLocked = 6154,
errPnSpeedkeyNotassigned = 6155,
errPnEmpty = 6156,
errDataNotAvail = 6401,
errSsUnknownSubscriber = 6402,
errSsBearerServNotProvision = 6403,
errSsTeleServNotProvision = 6404,
errSsCUGReject = 6405,
errSsIllegalSsOperation = 6406,
errSsErrorStatus = 6407,
errSsNotAvailable = 6408,
errSsSubscriptionViolation = 6409,
errSsIncompatibility = 6410,
errSsSpecificError = 6411,
errSsSystemFailure = 6412,
errSsDataMissing = 6413,
errSsUnexpectedDataValue = 6414,
errSsPasswordRegisFailure = 6415,
errSsNegativePasswordCheck = 6416,
errSsFacilityNotSupported = 6417,
errSsResourcesNotAvailable = 6418,
errSsMaxnumOfMptyPartExceed = 6419,
errSsCallBarred = 6420,
errSsMaxnumOfPwAttViolation = 6421,
errSsAbsentSubscriber = 6422,
errSsUSSDBusy = 6423,
errSsUnknownAlphabet = 6424,
errWrongPassword = 6425,
errPasswordNotRequired = 6426,
errUpdateImpossible = 6427,
errNetCallActive = 6428,
errNetNoMsgToQuit = 6429,
errNetUnableToQuit = 6430,
errNetAccessDenied = 6431,
errSsMMError = 6432,
errSsMsgError = 6433,
errSsMMRelease = 6434,
errSsActivationDataLost = 6435,
errSsServiceBusy = 6436,
errSsDataError = 6437,
errSsTimerExpired = 6438,
errSsPWErrorEnterPassword = 6439,
errSsPWErrorEnterNewPassword = 6440,
errSsPWErrorEnterNewPasswordAgain = 6441,
errSsPWErrorBadPassword = 6442,
errSsPWErrorBadPasswordFormat = 6443,
errSsPReturnErrorProblem = 6444,
errSsPUnrecognizedComp = 6445,
errSsPMistypedComp = 6446,
errSsPBadlyStructuredComp = 6447,
errSsPDuplicateInvokeID = 6448,
errSsPUnrecognizedOperation = 6449,
errSsPMistypedInvParameter = 6450,
errSsPResourceLimitation = 6451,
errSsPInitiatingRelease = 6452,
errSsPUnrecognizedLinkedID = 6453,
errSsPLinkedRespUnexpected = 6454,
errSsPUnexpectedLinkedOper = 6455,
errSsPUnrecognizedInvokeID = 6456,
errSsPReturnResultUnexpected = 6457,
errSsPMistypedResParameter = 6458,
errSsPReturnErrorUnexpected = 6459,
errSsPUnrecognizedError = 6460,
errSsPUnexpectedError = 6461,
errSsPMistypedErrParameter = 6462,
errSmsCreateFailed = 6657,
errSmsCannotSendMTMessages = 6658,
errSmsInvalidType = 6659,
errSmsInvalidDataCodingScheme = 6660,
errSmsInvalidUserDataLength = 6661,
errSmsInvalidUserDataFormat = 6662,
errSmsInvalidUserData = 6663,
errSmsInvalidUserDataHeaderLength = 6664,
errSmsInvalidSCTimeStamp = 6665,
errSmsTooLongSCAddress = 6666,
errSmsInvalidValidityPeriod = 6667,
errSmsTooLongOtherEndAddress = 6668,
errSmsInvalidParameterSetIndex = 6669,
errSmsTypeMOUndefined = 6670,
errSmsTypeMTUndefined = 6671,
errSmsTypeCommand = 6672,
errSmsNoSCAddress = 6673,
errSmsDefaultSetNameUsed = 6674,
errProtocolError = 6675,
errDbXXXX = 6913,
errNoError = 0,
errUnknown = 7935,
errInvalidLocation = 7681,
errInvalidParameter = 7682,
errReserved = 7683,
errMemoryFull = 7684,
errEmptyLocation = 7685,
errInvalidNumber = 7686,
errCallCostLimitReached = 7687,
errRLP = 7688,
errCommunicationError = 7689,
errNotSupported = 7690,
errMpApiNotAvail = 7691,
errDeviceFailure = 7692,
errNoSim = 7693,
errTerminalNotReady = 7694,
errSignallingFailure = 7695,
errPhoneNotConnected = 7696,
errPinRequired = 7697,
errPukRequired = 7698,
errPin2Required = 7699,
errPuk2Required = 7700,
errSecurityCodeRequired = 7701,
errBarred = 7702,
errSIMRejected = 7703
} NmpAdapterError;
[
odl,
uuid(0EC2D401-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSMemory Interface",
oleautomation
]
interface ISMSMemory : IUnknown {
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
[helpstring("method Delete"]
HRESULT _stdcall Delete(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex);
[helpstring("method Read"]
HRESULT _stdcall Read(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex,
[out] IShortMessage** ppSMS,
[in] long MarkMessageAsRead);
[helpstring("method Store"]
HRESULT _stdcall Store(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex,
[in] IShortMessage* pSMS);
[helpstring("method GetCapasityInME"]
HRESULT _stdcall GetCapasityInME([out] long* pMESMSMemorySize);
[helpstring("method GetCapasityInSIM"]
HRESULT _stdcall GetCapasityInSIM([out] long* pSIMSMSMemorySize);
[helpstring("method GetNumberOfMessagesInME"]
HRESULT _stdcall GetNumberOfMessagesInME([out] long* pAmountOfMessagesInMESMSMemory);
[helpstring("method GetNumberOfMessagesInSIM"]
HRESULT _stdcall GetNumberOfMessagesInSIM([out] long* pAmountOfMessagesInSIMSMSMemory);
[helpstring("method GetNumberOfUnreadInME"]
HRESULT _stdcall GetNumberOfUnreadInME([out] long* pAmountOfUnreadMessagesInMESMSMemory);
[helpstring("method GetNumberOfUnreadInSIM"]
HRESULT _stdcall GetNumberOfUnreadInSIM([out] long* pAmountOfUnreadMessagesInSIMSMSMemory);
[helpstring("method GetMemoryConfiguration"]
HRESULT _stdcall GetMemoryConfiguration([out] long* pMemoryStatus);
[helpstring("method GetCapasityOfParamSets"]
HRESULT _stdcall GetCapasityOfParamSets([out] long* pAmountOfParamSets);
[helpstring("method GetSMSMemoryStatus"]
HRESULT _stdcall GetSMSMemoryStatus(
[out] long* pMESize,
[out] long* pSIMSize,
[out] long* pMessagesInME,
[out] long* pMessagesInSIM,
[out] long* pUnreadInME,
[out] long* pUnreadInSIM,
[out] long* pMemoryConfiguration,
[out] long* pCapasityOfParamSets);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
typedef [uuid(1577C343-174C-11D3-B1FF-006097838405), helpstring("SMS memory location type"]
enum {
SIM_MEMORY = 0,
PHONE_MEMORY = 1,
DEFAULT_MEMORY = 2
} SMS_MEMORY_LOCATION;
[
odl,
uuid(0EC2D402-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSSettings Interface",
oleautomation
]
interface ISMSSettings : IUnknown {
[helpstring("method GetCommonSMSSettings"]
HRESULT _stdcall GetCommonSMSSettings(
[out] long* pStatusReportRequest,
[out] long* pReplyPath);
[helpstring("method SetCommonSMSSettings"]
HRESULT _stdcall SetCommonSMSSettings(
[in] long StatusReportRequest,
[in] long ReplyPath);
[helpstring("method GetSMSParametersSet"]
HRESULT _stdcall GetSMSParametersSet(
[in] long ParameterSetIndex,
[out] BSTR* pParameterSetName,
[out] unsigned char* pProtocolIdentifier,
[out] unsigned char* pDataCodingScheme,
[out] unsigned char* pValidityPeriod,
[out] BSTR* pSCAddress);
[helpstring("method SetSMSParametersSet"]
HRESULT _stdcall SetSMSParametersSet(
[in] long ParameterSetIndex,
[in] BSTR ParameterSetName,
[in] unsigned char ProtocolIdentifier,
[in] unsigned char DataCodingScheme,
[in] unsigned char ValidityPeriod,
[in] BSTR SCAddress);
[helpstring("method SetRoutingParameters"]
HRESULT _stdcall SetRoutingParameters(
[in] unsigned char PDUType,
[in] unsigned char RoutingType,
[in] unsigned char RoutingByte1,
[in] unsigned char RoutingByte2,
[in] unsigned char RoutingByte3);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
[
odl,
uuid(0EC2D403-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSReceiveNotify Interface",
oleautomation
]
interface ISMSReceiveNotify : IUnknown {
[helpstring("method ShortMsgReceived"]
HRESULT _stdcall ShortMsgReceived(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long index,
[in] IShortMessage* pSMS);
[helpstring("method SMSMemoryFull"]
HRESULT _stdcall SMSMemoryFull([in] SMS_MEMORY_LOCATION SMSMemory);
[helpstring("method ShortMsgSent"]
HRESULT _stdcall ShortMsgSent([in] IShortMessage* pSMS);
};
[
odl,
uuid(8829E754-FA43-4D8D-B009-DB4024BE200E),
helpstring("IGraphicalMS Interface",
oleautomation
]
interface IGraphicalMS : IUnknown {
[helpstring("method CreateGMSObject"]
HRESULT _stdcall CreateGMSObject([out, retval] IGMSPicture** ppIPicture);
[helpstring("method FindNextGMS"]
HRESULT _stdcall FindNextGMS(
[in] VARIANT_BOOL updateStatus,
[in, out] STORAGE_STATUS* Status,
[in, out] short* pNext,
[out, retval] IGMSPicture** ppIPicture);
[helpstring("method SaveGMS"]
HRESULT _stdcall SaveGMS(
[in] STORAGE_STATUS Status,
[in] IGMSPicture* pIPicture,
[in, out] short* pIndex);
};
[
odl,
uuid(A6DA8A41-354A-49CF-9253-5DC814664A32),
helpstring("IGMSPicture Interface"
]
interface IGMSPicture : IUnknown {
[propget, helpstring("property MsgRejectDublicates"]
HRESULT _stdcall MsgRejectDublicates([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgRejectDublicates"]
HRESULT _stdcall MsgRejectDublicates([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgReplyPath"]
HRESULT _stdcall MsgReplyPath([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgReplyPath"]
HRESULT _stdcall MsgReplyPath([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgStatusReportRequest"]
HRESULT _stdcall MsgStatusReportRequest([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgStatusReportRequest"]
HRESULT _stdcall MsgStatusReportRequest([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgOriginatorAddress"]
HRESULT _stdcall MsgOriginatorAddress([out, retval] BSTR* pVal);
[propput, helpstring("property MsgOriginatorAddress"]
HRESULT _stdcall MsgOriginatorAddress([in] BSTR pVal);
[propget, helpstring("property MsgProtocolID"]
HRESULT _stdcall MsgProtocolID([out, retval] short* pVal);
[propput, helpstring("property MsgProtocolID"]
HRESULT _stdcall MsgProtocolID([in] short pVal);
[propget, helpstring("property MsgDCS"]
HRESULT _stdcall MsgDCS([out, retval] short* pVal);
[propput, helpstring("property MsgDCS"]
HRESULT _stdcall MsgDCS([in] short pVal);
[propget, helpstring("property MsgValidityPeriodFormat"]
HRESULT _stdcall MsgValidityPeriodFormat([out, retval] VALIDITY_PERIOD_FORMAT* pVal);
[propput, helpstring("property MsgValidityPeriodFormat"]
HRESULT _stdcall MsgValidityPeriodFormat([in] VALIDITY_PERIOD_FORMAT pVal);
[propget, helpstring("property MsgValidityPeriod"]
HRESULT _stdcall MsgValidityPeriod([out, retval] BSTR* pVal);
[propput, helpstring("property MsgValidityPeriod"]
HRESULT _stdcall MsgValidityPeriod([in] BSTR pVal);
[propget, helpstring("property MsgText"]
HRESULT _stdcall MsgText([out, retval] BSTR* pVal);
[propput, helpstring("property MsgText"]
HRESULT _stdcall MsgText([in] BSTR pVal);
[propget, helpstring("property PicInfoField"]
HRESULT _stdcall PicInfoField([out, retval] short* pVal);
[propput, helpstring("property PicInfoField"]
HRESULT _stdcall PicInfoField([in] short pVal);
[propget, helpstring("property PicDepth"]
HRESULT _stdcall PicDepth([out, retval] short* pVal);
[propput, helpstring("property PicDepth"]
HRESULT _stdcall PicDepth([in] short pVal);
[propget, helpstring("property PicWidth"]
HRESULT _stdcall PicWidth([out, retval] short* pVal);
[propput, helpstring("property PicWidth"]
HRESULT _stdcall PicWidth([in] short pVal);
[propget, helpstring("property PicHeight"]
HRESULT _stdcall PicHeight([out, retval] short* pVal);
[propput, helpstring("property PicHeight"]
HRESULT _stdcall PicHeight([in] short pVal);
[propget, helpstring("property PicDataLength"]
HRESULT _stdcall PicDataLength([out, retval] short* pVal);
[propput, helpstring("property PicDataLength"]
HRESULT _stdcall PicDataLength([in] short pVal);
[propget, helpstring("property PicData"]
HRESULT _stdcall PicData(
[in] short index,
[out, retval] short* pVal);
[propput, helpstring("property PicData"]
HRESULT _stdcall PicData(
[in] short index,
[in] short pVal);
};
[
uuid(3369A2C6-E58F-11D1-B1FC-006097838405),
helpstring("Nokia ShortMessage Data Component"
]
coclass ShortMessage {
[default] interface IShortMessage;
};
[
uuid(FE4A3D7F-DED7-47E9-9F97-4A9859B728B9),
helpstring("Nokia GMSPicture"
]
coclass GMSPicture {
[default] interface IGMSPicture;
};
};
OLE exception error "name". OLE object may be corrupt. (Error 1440)
A COM object or COM control caused a general protection fault, possibly because it was passed bad parameters. Release or reload the COM object or COM control.
I am using the Nokia PC Connectivity SDK version 2.1 downloaded from
I would like to create an application using VFP7 IDE and not the recommended programming IDEs (VB6,VC++6,Delphi) but
I am having trouble resolving the above error.
I see nothing wrong with my VB6 to VFP7 translation.
Please help me figure out what I have missed out.
Thanks for any help.
The following VB6 sample code is working as expected:
[01] ' VISUAL BASIC CODE (WORKING)
[02] Dim objSMS As SMS3ASuiteLib.SMS_SuiteAdapter
[03] Dim objMess As SMS3ASuiteLib.ShortMessage
[04]
[05] Dim CellNum As String
[06] Dim TextMesg As String
[07]
[08] CellNum = '353863982273'
[09] TextMesg = 'TESTING NOKIA DATA SUITE'
[10]
[11] If Len(CellNum) <> 0 And Len(TextMesg) <> 0 Then
[12] Set objSMS = New SMS3ASuiteLib.SMS_SuiteAdapter
[13] Set objMess = objSMS.CreateShortMsg
[14]
[15] objMess.UserDataText = TextMesg
[16] objMess.OtherEndAddress = CellNum
[17]
[18] Call objSMS.Send(objMess)
[19]
[20] Set objMess = Nothing
[21] objSMS.Terminate
[22] Set objSMS = Nothing
[23] Else
[24] If Len(CellNum) = 0 Then
[25]
[26] MsgBox "No Phone number has been entered, please enter in a phone number.", _
[27] vbCritical + vbOKOnly, _
[28] "Error Management System"
[29]
[30] End If
[31]
[32] If Len(TextMesg) = 0 Then
[33]
[34] MsgBox "No message exists, please enter in a message.", _
[35] vbCritical + vbOKOnly, _
[36] "Error Management System"
[37]
[38] End If
[39]
[40] End If
The following VFP7 code translation fires up the debugger at line [18] indicating an OLE error 1440:
Note that at line [13a], I assigned objMess to .NULL. to have its data type correctly regarded as an object and not a boolean (which is the case when I leave it as ease).
Note that at line [13b], I used the syntax based on the type library of the COM server I am using.
That is,
IDL:
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
VFP7:
CreateShortMsg(ppSMS as IShortMessage @) as VOID
Note that at line [], I used the syntax based on the type library of the COM server I am using.
That is,
IDL:
[helpstring("method Send"]
HRESULT _stdcall Send([in] IShortMessage* pSMS);
VFP7:
Send(pSMS as IShortMessage) as VOID
[01] * VISUAL FOXPRO TRANSLATION(WITH ERROR 1440)
[02] LOCAL objSMS As SMS3ASuiteLib.SMS_SuiteAdapter
[03] LOCAL objMess As SMS3ASuiteLib.ShortMessage
[04]
[05] LOCAL CellNum
[06] LOCAL TextMesg
[07]
[08] CellNum = '353863982273'
[09] TextMesg = 'TESTING NOKIA DATA SUITE'
[10]
[11] If Len(CellNum) # 0 And Len(TextMesg) # 0
[12] objSMS = CREATEOBJECTEX('SMSAdapter.SMSAdapter.1','','')
[13a] objMess = .NULL. && objMess is initially a boolean with value = .F.
[13b] objSMS.CreateShortMsg(@objMess)
[14]
[15] objMess.UserDataText = TextMesg
[16] objMess.OtherEndAddress = CellNum
[17]
[18] objSMS.Send(objMess)
[19]
[20] objMess = .NULL.
[21] objSMS.Terminate
[22] objSMS = .NULL.
[23] Else
[24] If Len(CellNum) = 0 Then
[25]
[26] MessageBox("No Phone number has been entered, please enter in a phone number.", ;
[27] 48 + 0, ;
[28] "Error Management System"
[29]
[30] EndIf
[31]
[32] If Len(TextMesg) = 0
[33]
[34] MessageBox("No message exists, please enter in a message.", ;
[35] 48 + 0, ;
[36] "Error Management System"
[37]
[38] EndIf
[39]
[40] EndIf
Here is the Type Library of the COM Server I am working on:
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: Sms3aS.dll
[
uuid(3369A2B7-E58F-11D1-B1FC-006097838405),
version(1.0),
helpstring("Nokia SMS Adapter (PC Suite 3.7)"
]
library SMS3ASuiteLib
{
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib("stdole2.tlb"
// Forward declare all types defined in this typelib
interface ISMSSend;
interface IShortMessage;
interface ISMSMemory;
interface ISMSSettings;
interface ISMSReceiveNotify;
interface IGraphicalMS;
interface IGMSPicture;
[
uuid(2E6EB774-804D-11D1-B1FC-006097838405),
helpstring("Nokia SMS (PC Suite 3.7)"
]
coclass SMS_SuiteAdapter {
[default] interface ISMSSend;
interface ISMSMemory;
interface ISMSSettings;
[default, source] interface ISMSReceiveNotify;
interface IGraphicalMS;
};
[
odl,
uuid(3369A2C4-E58F-11D1-B1FC-006097838405),
helpstring("ISMSSend Interface",
oleautomation
]
interface ISMSSend : IUnknown {
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
[helpstring("method Send"]
HRESULT _stdcall Send([in] IShortMessage* pSMS);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
[
odl,
uuid(3369A2C5-E58F-11D1-B1FC-006097838405),
helpstring("IShortMessage Interface",
oleautomation
]
interface IShortMessage : IUnknown {
[propget, helpstring("property ValidityPeriodFormat"]
HRESULT _stdcall ValidityPeriodFormat([out, retval] VALIDITY_PERIOD_FORMAT* pVal);
[propput, helpstring("property ValidityPeriodFormat"]
HRESULT _stdcall ValidityPeriodFormat([in] VALIDITY_PERIOD_FORMAT pVal);
[propget, helpstring("property ValidityPeriodRelative"]
HRESULT _stdcall ValidityPeriodRelative([out, retval] unsigned char* pVal);
[propput, helpstring("property ValidityPeriodRelative"]
HRESULT _stdcall ValidityPeriodRelative([in] unsigned char pVal);
[helpstring("method put_ValidityPeriodAbsolute"]
HRESULT _stdcall put_ValidityPeriodAbsolute(
[in] long year,
[in] long month,
[in] long day,
[in] long hour,
[in] long minute,
[in] long second,
[in] long timeZone);
[helpstring("method get_ValidityPeriodAbsolute"]
HRESULT _stdcall get_ValidityPeriodAbsolute(
[out] long* pYear,
[out] long* pMonth,
[out] long* pDay,
[out] long* pHour,
[out] long* pMinute,
[out] long* pSecond,
[out] long* pTimeZone);
[helpstring("method put_ValidityPeriodEnhanced"]
HRESULT _stdcall put_ValidityPeriodEnhanced(
[in] unsigned char functionalityIndicator,
[in] unsigned char byte2,
[in] unsigned char byte3,
[in] unsigned char byte4,
[in] unsigned char byte5,
[in] unsigned char byte6,
[in] unsigned char byte7);
[helpstring("method get_ValidityPeriodEnhanced"]
HRESULT _stdcall get_ValidityPeriodEnhanced(
[out] unsigned char* pFunctionalityIndicator,
[out] unsigned char* pByte2,
[out] unsigned char* pByte3,
[out] unsigned char* pByte4,
[out] unsigned char* pByte5,
[out] unsigned char* pByte6,
[out] unsigned char* pByte7);
[propget, helpstring("property DataCodingScheme"]
HRESULT _stdcall DataCodingScheme([out, retval] unsigned char* pVal);
[propput, helpstring("property DataCodingScheme"]
HRESULT _stdcall DataCodingScheme([in] unsigned char pVal);
[propget, helpstring("property OtherEndAddress"]
HRESULT _stdcall OtherEndAddress([out, retval] BSTR* pVal);
[propput, helpstring("property OtherEndAddress"]
HRESULT _stdcall OtherEndAddress([in] BSTR pVal);
[propget, helpstring("property ProtocolIdentifier"]
HRESULT _stdcall ProtocolIdentifier([out, retval] unsigned char* pVal);
[propput, helpstring("property ProtocolIdentifier"]
HRESULT _stdcall ProtocolIdentifier([in] unsigned char pVal);
[propget, helpstring("property SCAddress"]
HRESULT _stdcall SCAddress([out, retval] BSTR* pVal);
[propput, helpstring("property SCAddress"]
HRESULT _stdcall SCAddress([in] BSTR pVal);
[helpstring("method get_SCTimeStamp"]
HRESULT _stdcall get_SCTimeStamp(
[out] long* pYear,
[out] long* pMonth,
[out] long* pDay,
[out] long* pHour,
[out] long* pMinute,
[out] long* pSecond,
[out] long* pTimeZone);
[helpstring("method put_SCTimeStamp"]
HRESULT _stdcall put_SCTimeStamp(
[in] long year,
[in] long month,
[in] long day,
[in] long hour,
[in] long minute,
[in] long second,
[in] long timeZone);
[propget, helpstring("property StorageStatus"]
HRESULT _stdcall StorageStatus([out, retval] STORAGE_STATUS* pVal);
[propput, helpstring("property StorageStatus"]
HRESULT _stdcall StorageStatus([in] STORAGE_STATUS pVal);
[propget, helpstring("property MessageType"]
HRESULT _stdcall MessageType([out, retval] SMS_MESSAGE_TYPE* pVal);
[propput, helpstring("property MessageType"]
HRESULT _stdcall MessageType([in] SMS_MESSAGE_TYPE pVal);
[propget, helpstring("property UserDataFormat"]
HRESULT _stdcall UserDataFormat([out, retval] USER_DATA_FORMAT* pVal);
[propput, helpstring("property UserDataFormat"]
HRESULT _stdcall UserDataFormat([in] USER_DATA_FORMAT pVal);
[propget, helpstring("property UserDataText"]
HRESULT _stdcall UserDataText([out, retval] BSTR* pVal);
[propput, helpstring("property UserDataText"]
HRESULT _stdcall UserDataText([in] BSTR pVal);
[propget, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property MessageReference"]
HRESULT _stdcall MessageReference([out, retval] unsigned char* pVal);
[propput, helpstring("property MessageReference"]
HRESULT _stdcall MessageReference([in] unsigned char pVal);
[propget, helpstring("property StatusReportRequest"]
HRESULT _stdcall StatusReportRequest([out, retval] long* pVal);
[propput, helpstring("property StatusReportRequest"]
HRESULT _stdcall StatusReportRequest([in] long pVal);
[propget, helpstring("property ReplyPath"]
HRESULT _stdcall ReplyPath([out, retval] long* pVal);
[propput, helpstring("property ReplyPath"]
HRESULT _stdcall ReplyPath([in] long pVal);
[propget, helpstring("property CommandType"]
HRESULT _stdcall CommandType([out, retval] unsigned char* pVal);
[propput, helpstring("property CommandType"]
HRESULT _stdcall CommandType([in] unsigned char pVal);
[propget, helpstring("property CommandMessageNumber"]
HRESULT _stdcall CommandMessageNumber([out, retval] unsigned char* pVal);
[propput, helpstring("property CommandMessageNumber"]
HRESULT _stdcall CommandMessageNumber([in] unsigned char pVal);
[propget, helpstring("property StatusReportQualifier"]
HRESULT _stdcall StatusReportQualifier([out, retval] REPORT_QUALIFIER* pVal);
[propput, helpstring("property StatusReportQualifier"]
HRESULT _stdcall StatusReportQualifier([in] REPORT_QUALIFIER pVal);
[propget, helpstring("property Status"]
HRESULT _stdcall Status([out, retval] unsigned char* pVal);
[propput, helpstring("property Status"]
HRESULT _stdcall Status([in] unsigned char pVal);
[propget, helpstring("property UserDataLength"]
HRESULT _stdcall UserDataLength([out, retval] long* pVal);
[propput, helpstring("property UserDataLength"]
HRESULT _stdcall UserDataLength([in] long pVal);
[propget, helpstring("property UserDataHeaderLength"]
HRESULT _stdcall UserDataHeaderLength([out, retval] long* pVal);
[propput, helpstring("property UserDataHeaderLength"]
HRESULT _stdcall UserDataHeaderLength([in] long pVal);
};
typedef [uuid(F1D64502-176A-11D3-B1FF-006097838405), helpstring("SMS validity period type"]
enum {
NOT_PRESENT = 0,
RELATIVE_FORMAT = 1,
ENHANCED_FORMAT = 2,
ABSOLUTE_FORMAT = 3
} VALIDITY_PERIOD_FORMAT;
typedef [uuid(1577C341-174C-11D3-B1FF-006097838405), helpstring("SMS storage status type"]
enum {
NOT_SENT_FROM_PHONE = 0,
SENT_FROM_PHONE = 1,
DELIVERED = 2,
READ_FROM_PHONE = 3,
NOT_READ_FROM_PHONE = 4
} STORAGE_STATUS;
typedef [uuid(475AF0E5-14FD-11D3-B1FF-006097838405), helpstring("SMS message type"]
enum {
DELIVER_MESSAGE = 0,
STATUS_REPORT_MESSAGE = 1,
SUBMIT_MESSAGE = 2,
COMMAND_MESSAGE = 3,
MO_UNDEFINED_MESSAGE = 4,
MT_UNDEFINED_MESSAGE = 5
} SMS_MESSAGE_TYPE;
typedef [uuid(475AF0E3-14FD-11D3-B1FF-006097838405), helpstring("SMS user data coding format"]
enum {
DATA_CODING_SCHEME_BASED = 0,
DEFAULT_ALPHABET_7_BIT = 1,
DATA_8_BIT = 2,
UNICODE_16_BIT = 3
} USER_DATA_FORMAT;
typedef [uuid(475AF0E4-14FD-11D3-B1FF-006097838405), helpstring("Type of message that has requested Status Report"]
enum {
SUBMIT_REQUESTED = 0,
COMMAND_REQUESTED = 1
} REPORT_QUALIFIER;
typedef [uuid(60CC5E00-D3A2-11D1-99A0-0060979AC1B6), helpstring("Nokia adapter error codes"]
enum {
errCalendarNotSupported = 5377,
errCalendarUnknownNoteType = 5378,
errCalendarUnknownItemType = 5379,
errCalendarComponentCreation = 5380,
errCalendarItemRead = 5381,
errCalendarItemWrite = 5382,
errCalendarItemDelete = 5383,
errCalendarCallEmpty = 5384,
errCalendarNoMoreNotes = 5385,
errCalendarEmpty = 5386,
errCalendarNoDelete = 5387,
errCallNoActiveCall = 5633,
errCallNoDualModeCall = 5634,
errCallAlreadyActive = 5635,
errCallSignallingFailure = 5636,
errCallInvalidMode = 5637,
errCbSettingSetFailed = 5889,
errCbInvalidLanguage = 5890,
errCbInvalidTopic = 5891,
errCbToomanyLang = 5892,
errCbToomanyTopic = 5893,
errPnInvalidMemory = 6145,
errPnNumberTooLong = 6146,
errPnNameTooLong = 6147,
errPnInvalidCharacters = 6148,
errPnMemoryFull = 6149,
errPnNotAvail = 6150,
errPnTimestampNotavail = 6151,
errPnCallergroupsNotsupported = 6152,
errPnInvalidIconFormat = 6153,
errPnEntryLocked = 6154,
errPnSpeedkeyNotassigned = 6155,
errPnEmpty = 6156,
errDataNotAvail = 6401,
errSsUnknownSubscriber = 6402,
errSsBearerServNotProvision = 6403,
errSsTeleServNotProvision = 6404,
errSsCUGReject = 6405,
errSsIllegalSsOperation = 6406,
errSsErrorStatus = 6407,
errSsNotAvailable = 6408,
errSsSubscriptionViolation = 6409,
errSsIncompatibility = 6410,
errSsSpecificError = 6411,
errSsSystemFailure = 6412,
errSsDataMissing = 6413,
errSsUnexpectedDataValue = 6414,
errSsPasswordRegisFailure = 6415,
errSsNegativePasswordCheck = 6416,
errSsFacilityNotSupported = 6417,
errSsResourcesNotAvailable = 6418,
errSsMaxnumOfMptyPartExceed = 6419,
errSsCallBarred = 6420,
errSsMaxnumOfPwAttViolation = 6421,
errSsAbsentSubscriber = 6422,
errSsUSSDBusy = 6423,
errSsUnknownAlphabet = 6424,
errWrongPassword = 6425,
errPasswordNotRequired = 6426,
errUpdateImpossible = 6427,
errNetCallActive = 6428,
errNetNoMsgToQuit = 6429,
errNetUnableToQuit = 6430,
errNetAccessDenied = 6431,
errSsMMError = 6432,
errSsMsgError = 6433,
errSsMMRelease = 6434,
errSsActivationDataLost = 6435,
errSsServiceBusy = 6436,
errSsDataError = 6437,
errSsTimerExpired = 6438,
errSsPWErrorEnterPassword = 6439,
errSsPWErrorEnterNewPassword = 6440,
errSsPWErrorEnterNewPasswordAgain = 6441,
errSsPWErrorBadPassword = 6442,
errSsPWErrorBadPasswordFormat = 6443,
errSsPReturnErrorProblem = 6444,
errSsPUnrecognizedComp = 6445,
errSsPMistypedComp = 6446,
errSsPBadlyStructuredComp = 6447,
errSsPDuplicateInvokeID = 6448,
errSsPUnrecognizedOperation = 6449,
errSsPMistypedInvParameter = 6450,
errSsPResourceLimitation = 6451,
errSsPInitiatingRelease = 6452,
errSsPUnrecognizedLinkedID = 6453,
errSsPLinkedRespUnexpected = 6454,
errSsPUnexpectedLinkedOper = 6455,
errSsPUnrecognizedInvokeID = 6456,
errSsPReturnResultUnexpected = 6457,
errSsPMistypedResParameter = 6458,
errSsPReturnErrorUnexpected = 6459,
errSsPUnrecognizedError = 6460,
errSsPUnexpectedError = 6461,
errSsPMistypedErrParameter = 6462,
errSmsCreateFailed = 6657,
errSmsCannotSendMTMessages = 6658,
errSmsInvalidType = 6659,
errSmsInvalidDataCodingScheme = 6660,
errSmsInvalidUserDataLength = 6661,
errSmsInvalidUserDataFormat = 6662,
errSmsInvalidUserData = 6663,
errSmsInvalidUserDataHeaderLength = 6664,
errSmsInvalidSCTimeStamp = 6665,
errSmsTooLongSCAddress = 6666,
errSmsInvalidValidityPeriod = 6667,
errSmsTooLongOtherEndAddress = 6668,
errSmsInvalidParameterSetIndex = 6669,
errSmsTypeMOUndefined = 6670,
errSmsTypeMTUndefined = 6671,
errSmsTypeCommand = 6672,
errSmsNoSCAddress = 6673,
errSmsDefaultSetNameUsed = 6674,
errProtocolError = 6675,
errDbXXXX = 6913,
errNoError = 0,
errUnknown = 7935,
errInvalidLocation = 7681,
errInvalidParameter = 7682,
errReserved = 7683,
errMemoryFull = 7684,
errEmptyLocation = 7685,
errInvalidNumber = 7686,
errCallCostLimitReached = 7687,
errRLP = 7688,
errCommunicationError = 7689,
errNotSupported = 7690,
errMpApiNotAvail = 7691,
errDeviceFailure = 7692,
errNoSim = 7693,
errTerminalNotReady = 7694,
errSignallingFailure = 7695,
errPhoneNotConnected = 7696,
errPinRequired = 7697,
errPukRequired = 7698,
errPin2Required = 7699,
errPuk2Required = 7700,
errSecurityCodeRequired = 7701,
errBarred = 7702,
errSIMRejected = 7703
} NmpAdapterError;
[
odl,
uuid(0EC2D401-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSMemory Interface",
oleautomation
]
interface ISMSMemory : IUnknown {
[helpstring("method CreateShortMsg"]
HRESULT _stdcall CreateShortMsg([out, retval] IShortMessage** ppSMS);
[helpstring("method Delete"]
HRESULT _stdcall Delete(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex);
[helpstring("method Read"]
HRESULT _stdcall Read(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex,
[out] IShortMessage** ppSMS,
[in] long MarkMessageAsRead);
[helpstring("method Store"]
HRESULT _stdcall Store(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long SMSIndex,
[in] IShortMessage* pSMS);
[helpstring("method GetCapasityInME"]
HRESULT _stdcall GetCapasityInME([out] long* pMESMSMemorySize);
[helpstring("method GetCapasityInSIM"]
HRESULT _stdcall GetCapasityInSIM([out] long* pSIMSMSMemorySize);
[helpstring("method GetNumberOfMessagesInME"]
HRESULT _stdcall GetNumberOfMessagesInME([out] long* pAmountOfMessagesInMESMSMemory);
[helpstring("method GetNumberOfMessagesInSIM"]
HRESULT _stdcall GetNumberOfMessagesInSIM([out] long* pAmountOfMessagesInSIMSMSMemory);
[helpstring("method GetNumberOfUnreadInME"]
HRESULT _stdcall GetNumberOfUnreadInME([out] long* pAmountOfUnreadMessagesInMESMSMemory);
[helpstring("method GetNumberOfUnreadInSIM"]
HRESULT _stdcall GetNumberOfUnreadInSIM([out] long* pAmountOfUnreadMessagesInSIMSMSMemory);
[helpstring("method GetMemoryConfiguration"]
HRESULT _stdcall GetMemoryConfiguration([out] long* pMemoryStatus);
[helpstring("method GetCapasityOfParamSets"]
HRESULT _stdcall GetCapasityOfParamSets([out] long* pAmountOfParamSets);
[helpstring("method GetSMSMemoryStatus"]
HRESULT _stdcall GetSMSMemoryStatus(
[out] long* pMESize,
[out] long* pSIMSize,
[out] long* pMessagesInME,
[out] long* pMessagesInSIM,
[out] long* pUnreadInME,
[out] long* pUnreadInSIM,
[out] long* pMemoryConfiguration,
[out] long* pCapasityOfParamSets);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
typedef [uuid(1577C343-174C-11D3-B1FF-006097838405), helpstring("SMS memory location type"]
enum {
SIM_MEMORY = 0,
PHONE_MEMORY = 1,
DEFAULT_MEMORY = 2
} SMS_MEMORY_LOCATION;
[
odl,
uuid(0EC2D402-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSSettings Interface",
oleautomation
]
interface ISMSSettings : IUnknown {
[helpstring("method GetCommonSMSSettings"]
HRESULT _stdcall GetCommonSMSSettings(
[out] long* pStatusReportRequest,
[out] long* pReplyPath);
[helpstring("method SetCommonSMSSettings"]
HRESULT _stdcall SetCommonSMSSettings(
[in] long StatusReportRequest,
[in] long ReplyPath);
[helpstring("method GetSMSParametersSet"]
HRESULT _stdcall GetSMSParametersSet(
[in] long ParameterSetIndex,
[out] BSTR* pParameterSetName,
[out] unsigned char* pProtocolIdentifier,
[out] unsigned char* pDataCodingScheme,
[out] unsigned char* pValidityPeriod,
[out] BSTR* pSCAddress);
[helpstring("method SetSMSParametersSet"]
HRESULT _stdcall SetSMSParametersSet(
[in] long ParameterSetIndex,
[in] BSTR ParameterSetName,
[in] unsigned char ProtocolIdentifier,
[in] unsigned char DataCodingScheme,
[in] unsigned char ValidityPeriod,
[in] BSTR SCAddress);
[helpstring("method SetRoutingParameters"]
HRESULT _stdcall SetRoutingParameters(
[in] unsigned char PDUType,
[in] unsigned char RoutingType,
[in] unsigned char RoutingByte1,
[in] unsigned char RoutingByte2,
[in] unsigned char RoutingByte3);
[helpstring("method GetLastError"]
HRESULT _stdcall GetLastError([out, retval] NmpAdapterError* pErr);
[helpstring("method Terminate"]
HRESULT _stdcall Terminate();
[helpstring("method StartListeningEvents"]
HRESULT _stdcall StartListeningEvents();
};
[
odl,
uuid(0EC2D403-E8BC-11D1-B1FC-006097838405),
helpstring("ISMSReceiveNotify Interface",
oleautomation
]
interface ISMSReceiveNotify : IUnknown {
[helpstring("method ShortMsgReceived"]
HRESULT _stdcall ShortMsgReceived(
[in] SMS_MEMORY_LOCATION SMSMemory,
[in] long index,
[in] IShortMessage* pSMS);
[helpstring("method SMSMemoryFull"]
HRESULT _stdcall SMSMemoryFull([in] SMS_MEMORY_LOCATION SMSMemory);
[helpstring("method ShortMsgSent"]
HRESULT _stdcall ShortMsgSent([in] IShortMessage* pSMS);
};
[
odl,
uuid(8829E754-FA43-4D8D-B009-DB4024BE200E),
helpstring("IGraphicalMS Interface",
oleautomation
]
interface IGraphicalMS : IUnknown {
[helpstring("method CreateGMSObject"]
HRESULT _stdcall CreateGMSObject([out, retval] IGMSPicture** ppIPicture);
[helpstring("method FindNextGMS"]
HRESULT _stdcall FindNextGMS(
[in] VARIANT_BOOL updateStatus,
[in, out] STORAGE_STATUS* Status,
[in, out] short* pNext,
[out, retval] IGMSPicture** ppIPicture);
[helpstring("method SaveGMS"]
HRESULT _stdcall SaveGMS(
[in] STORAGE_STATUS Status,
[in] IGMSPicture* pIPicture,
[in, out] short* pIndex);
};
[
odl,
uuid(A6DA8A41-354A-49CF-9253-5DC814664A32),
helpstring("IGMSPicture Interface"
]
interface IGMSPicture : IUnknown {
[propget, helpstring("property MsgRejectDublicates"]
HRESULT _stdcall MsgRejectDublicates([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgRejectDublicates"]
HRESULT _stdcall MsgRejectDublicates([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgReplyPath"]
HRESULT _stdcall MsgReplyPath([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgReplyPath"]
HRESULT _stdcall MsgReplyPath([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgStatusReportRequest"]
HRESULT _stdcall MsgStatusReportRequest([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property MsgStatusReportRequest"]
HRESULT _stdcall MsgStatusReportRequest([in] VARIANT_BOOL pVal);
[propget, helpstring("property MsgOriginatorAddress"]
HRESULT _stdcall MsgOriginatorAddress([out, retval] BSTR* pVal);
[propput, helpstring("property MsgOriginatorAddress"]
HRESULT _stdcall MsgOriginatorAddress([in] BSTR pVal);
[propget, helpstring("property MsgProtocolID"]
HRESULT _stdcall MsgProtocolID([out, retval] short* pVal);
[propput, helpstring("property MsgProtocolID"]
HRESULT _stdcall MsgProtocolID([in] short pVal);
[propget, helpstring("property MsgDCS"]
HRESULT _stdcall MsgDCS([out, retval] short* pVal);
[propput, helpstring("property MsgDCS"]
HRESULT _stdcall MsgDCS([in] short pVal);
[propget, helpstring("property MsgValidityPeriodFormat"]
HRESULT _stdcall MsgValidityPeriodFormat([out, retval] VALIDITY_PERIOD_FORMAT* pVal);
[propput, helpstring("property MsgValidityPeriodFormat"]
HRESULT _stdcall MsgValidityPeriodFormat([in] VALIDITY_PERIOD_FORMAT pVal);
[propget, helpstring("property MsgValidityPeriod"]
HRESULT _stdcall MsgValidityPeriod([out, retval] BSTR* pVal);
[propput, helpstring("property MsgValidityPeriod"]
HRESULT _stdcall MsgValidityPeriod([in] BSTR pVal);
[propget, helpstring("property MsgText"]
HRESULT _stdcall MsgText([out, retval] BSTR* pVal);
[propput, helpstring("property MsgText"]
HRESULT _stdcall MsgText([in] BSTR pVal);
[propget, helpstring("property PicInfoField"]
HRESULT _stdcall PicInfoField([out, retval] short* pVal);
[propput, helpstring("property PicInfoField"]
HRESULT _stdcall PicInfoField([in] short pVal);
[propget, helpstring("property PicDepth"]
HRESULT _stdcall PicDepth([out, retval] short* pVal);
[propput, helpstring("property PicDepth"]
HRESULT _stdcall PicDepth([in] short pVal);
[propget, helpstring("property PicWidth"]
HRESULT _stdcall PicWidth([out, retval] short* pVal);
[propput, helpstring("property PicWidth"]
HRESULT _stdcall PicWidth([in] short pVal);
[propget, helpstring("property PicHeight"]
HRESULT _stdcall PicHeight([out, retval] short* pVal);
[propput, helpstring("property PicHeight"]
HRESULT _stdcall PicHeight([in] short pVal);
[propget, helpstring("property PicDataLength"]
HRESULT _stdcall PicDataLength([out, retval] short* pVal);
[propput, helpstring("property PicDataLength"]
HRESULT _stdcall PicDataLength([in] short pVal);
[propget, helpstring("property PicData"]
HRESULT _stdcall PicData(
[in] short index,
[out, retval] short* pVal);
[propput, helpstring("property PicData"]
HRESULT _stdcall PicData(
[in] short index,
[in] short pVal);
};
[
uuid(3369A2C6-E58F-11D1-B1FC-006097838405),
helpstring("Nokia ShortMessage Data Component"
]
coclass ShortMessage {
[default] interface IShortMessage;
};
[
uuid(FE4A3D7F-DED7-47E9-9F97-4A9859B728B9),
helpstring("Nokia GMSPicture"
]
coclass GMSPicture {
[default] interface IGMSPicture;
};
};