471,318 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

SMS Messaging in eVC++

Hello.

I'm currently developing an application in eVC++ which will be compiled as a
DLL and included in a VB.NET PocetPC program. I compile in eVC++ having
included the sms.h header file and having linked to the sms.lib library.

Here's my code for the OpenSMSHandle function:
UNMANAGED_API bool OpenSMSHandle()
{
SMS_HANDLE hSms = NULL;
HANDLE hSmsEvent = NULL;
HRESULT hr = S_OK;

OutputDebugString(TEXT("Entering OpenSMSHandle()"));

hr = SmsOpen(SMS_MSGTYPE_TEXT, SMS_MODE_RECEIVE, &hSms, &hSmsEvent);

if(FAILED(hr)){
OutputDebugString(TEXT("Could not open a handle to the SMS text message
service."));
return FALSE;
}

if(hSms){
SmsClose(hSms);
hSms = NULL;
}

return TRUE;
}
Everthing looks like it should work just fine, but when I compile I get the
error messages:
Unmanaged.obj : error LNK2019: unresolved external symbol SmsClose
referenced in function OpenSMSHandle
Unmanaged.obj : error LNK2019: unresolved external symbol SmsOpen referenced
in function OpenSMSHandle

This is strange since the compiler seems to recognize the the data
structures which are declared in the header file (such as SMS_HANDLE), while
at the same time the functions definde in the sms.h header file (like
SmsOpen) aren't recognized.

Why can't the compiler recognize the Sms functions? Thanks for any help you
can provide.
Jul 21 '05 #1
0 964

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dennis Owens | last post: by
reply views Thread by Dennis Owens | last post: by
reply views Thread by Systems001 | last post: by
reply views Thread by drblow | last post: by
10 posts views Thread by Eric BOUXIROT | last post: by
reply views Thread by Eric BOUXIROT | last post: by
reply views Thread by SkyRender | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.