Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Please slap me if I'm being stupid!

Author
Message
CJB
Valued Member
21
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 9th Mar 2006 14:26
I'm trying to write the TESTCOMMANDS project (from the This Party Commands tutorial in tech docs in the help, using Visual Studio Express with the Platform SDK installed, and a few tweaks to config files to allow DLL creation from the wizard), but the MessageBox command is failing (says MessageBoxW cannot convert LPSTR to LPCWSTR or something). So, to get round that compile error, I try to use LPCTSTR or LPCWSTR which then compiles up okay, but when I test it in DB-Pro, I either get an error message, or the MessageBox that pops up is full of garbled gibberish!

The 'GetValue' one works fine.

I'm certain I am doing something stupid, or maybe I've set something up wrong with VS Express.

Does anyone know what I'm doing wrong? Am I the only one who has had this problem? (I did some forum search but couldn't find anything).

Thanks.

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Mar 2006 16:01
Sounds like your using Unicode character set option instead of multi-byte. Change it in the project settings.

CJB
Valued Member
21
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 9th Mar 2006 17:37
You're right. I've changed it, but it still doesn't like LPSTR.

I'm also getting warnings that UNICODE specified for my pre-compiled headers but not for current compile now.

Also, why can't I use CString!??!? It falls flat on it's face!

ARGH! This is bugging. Maybe I should just find VC6? Would that help? This 'Express' edition is giving me a headache! (If it's that that's causing the problem).

CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Mar 2006 21:48
you are using unmanaged c++ arent you?

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
Supremacy
21
Years of Service
User Offline
Joined: 30th Dec 2003
Location:
Posted: 31st Mar 2006 03:54
what is unmanaged c++ ? and of course....what is managed c++ ?

Your signature has been erased by a mod because it's larger than 600x120....
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 31st Mar 2006 08:32
Unmanaged C++ is like the usual stuff like mfc/win32 etc etc.... Managed C++ uses the .net framework and can be easier sometimes.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 31st Mar 2006 21:39
Dont use pre-compiled headers - they are more trouble than they are worth.

I dont know whether you can use MFC with the Express version - you should have had the option when creating the project (its also in the project settings).

Login to post a reply

Server time is: 2025-08-08 17:27:31
Your offset time is: 2025-08-08 17:27:31