By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

VC++ ("include" problemand directx,platform SDK

P: n/a
i included the following line to VC++ after i installed the directx
SDK and platform SDK.
#include "DShow.h"

i configured c directories for the include and lib to both directx SDX
and platform SDK.
now just after i added the above line i got this messages:

D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(221) :
error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(222) :
error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(333) :
error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall '
for function compiled with /clr:pure or /clr:safe

actually i got lots of them but i copied-pasted only three.

what is the problem?

Jun 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 2007-06-03 22:57, untitled wrote:
i included the following line to VC++ after i installed the directx
SDK and platform SDK.
#include "DShow.h"

i configured c directories for the include and lib to both directx SDX
and platform SDK.
now just after i added the above line i got this messages:

D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(221) :
error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(222) :
error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(333) :
error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall '
for function compiled with /clr:pure or /clr:safe

actually i got lots of them but i copied-pasted only three.

what is the problem?
Your question is off topic since it does not deal with anything
concerning the C++ language, in the future try a group dedicated to your
platform/library (VC++ and DirectX) for better answers. For some
suggestions of which groups might be right take a look in the FAQ:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 some
quick searching in the microsoft.public.* groups should give you some
more options.

Back to your question: Your problem is that you have created a managed
project (or changed some options manually) and this have the /clr:pure
or /clr:safe switch passed to the compiler. This means that any code
declared as using the stdcall calling convection (about all C++ code out
there) will not be allowed. Create a new, native project or turn of the
switch and it should work.

--
Erik Wikström
Jun 3 '07 #2

P: n/a
On Jun 3, 11:25 pm, Erik Wikström <Erik-wikst...@telia.comwrote:
On 2007-06-03 22:57, untitled wrote:


i included the following line to VC++ after i installed the directx
SDK and platform SDK.
#include "DShow.h"
i configured c directories for the include and lib to both directx SDX
and platform SDK.
now just after i added the above line i got this messages:
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(221) :
error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(222) :
error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(333) :
error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall '
for function compiled with /clr:pure or /clr:safe
actually i got lots of them but i copied-pasted only three.
what is the problem?

Your question is off topic since it does not deal with anything
concerning the C++ language, in the future try a group dedicated to your
platform/library (VC++ and DirectX) for better answers. For some
suggestions of which groups might be right take a look in the FAQ:http://www.parashift.com/c++-faq-lit...ml#faq-5.9some
quick searching in the microsoft.public.* groups should give you some
more options.

Back to your question: Your problem is that you have created a managed
project (or changed some options manually) and this have the /clr:pure
or /clr:safe switch passed to the compiler. This means that any code
declared as using the stdcall calling convection (about all C++ code out
there) will not be allowed. Create a new, native project or turn of the
switch and it should work.

--
Erik Wikström- Hide quoted text -

- Show quoted text -
thanks alot! really appriciate it, here is the link about the walk
through to fix it:
http://msdn2.microsoft.com/en-us/lib...11(VS.80).aspx

you saved the day :)

Jun 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.