Completely New to C++

I decided I wanted to try and learn C++ to write some dll files to be used in audio programs as effect plug ins.

I downloaded the API information for the audio software I used and installed Microsoft Visual C++ Express.

The API had a sample project that I loaded in (I beleive correctly). When I debug I get 67 errors - primarily of this nature:

1>e:\applications\rml\api\original files\fx_api_testplugin.cpp(84) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [48]' to 'LPWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

line 84: lstrcpy(FxPtrSawData->FX_Title, szFxTitle);

1>e:\applications\rml\api\original files\fx_api_testplugin.cpp(393) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'char [65]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

line 393: MessageBox(NULL, CorruptedErrorMsg, WarningMsg, MB_TASKMODAL | MB_TOPMOST | MB_ICONEXCLAMATION | MB_OK);

1>e:\applications\rml\api\original files\fx_api_testplugin.cpp(494) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'char [49]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

line 494: MessageBox(NULL, MaximumAssignmentMsg, WarningMsg, MB_TASKMODAL | MB_TOPMOST | MB_ICONEXCLAMATION | MB_OK);

Let me know if you can steer me in the right direction.

Dave
You have to go to your project settings and turn off Unicode.

Hope this helps.
Definitely helped - Thanks

So now I get to here:

1>------ Build started: Project: FX, Configuration: Debug Win32 ------
1>Compiling...
1>Test.cpp
1>Linking...
1>Embedding manifest...
1>Build log was saved at "file://e:\C++ Learning\FX\FX\Debug\BuildLog.htm"
1>FX - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


Then I get a pop up asking for the executable file. This is where I get lost again. I have tried browsing to the .exe file that the dll would eventually be a part of. But that doesnt help - I wonder if it is because the dll is only used in the app when called upon?

ANy next steps would be appreciated.

Dave

I can't get the blasted .NET Framework 3.5 to install on my computer -- which means that VS won't install either, so I don't know what the dialog box is about.

A DLL is not designed to be executed by itself. It is a dynamic link library -- meaning some other program (EXE or DLL) uses it.

So now you need to write an EXE that uses your DLL.
I appreciate your help - I understand the dll is utilized within an exe file. I linked the debug to the executable file that the dll would run in. But in the audio application the dll would run in its a 'optional" file that needs to be installed. So when I link to the exe file - the program launches - but it has no reference to the dll being debugged.

So I am stuck. I was hoping to be able to compile the sample code from the API kit into the dll - and then start tearing apart the source code to understand how it works.

Any other thoughts?

I will dig through the API manual again and see if there is a contact email for support.

Thanks.

Topic archived. No new replies allowed.