472,986 Members | 2,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

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
2 3050
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
2
by: steve | last post by:
Hi, I need to do conditional script "include", but like to pull the code from db instead of a file. How do I do that? Reason: I like to implement some complex regex logic, and make it table...
5
by: Danny Anderson | last post by:
Hola! I am working on a program where I am including a library that came with my numerical methods textbook. The "util.h" simply includes a large number of files. I had to change the util.h...
7
by: mescaline | last post by:
Hi, Suppose a_file.cpp contains a function a_function() Now to include it in main_file.cpp I just do #include "a_file.cpp" and I'm all set. i recently came across this seemingly roundabout...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
2
by: clusardi2k | last post by:
Hello, I'm trying to understand someone else code. The below compiles and works fine and dandy. #include <sys/types.h> #include "unistd.h" #include "stdio.h"
2
by: Susan Baker | last post by:
Hi, I am (trying) to compile some code I downloaded from the internet. The sources contain references to header files - using the form : #include <pathname/file> If I change the form to...
3
by: Kceiw | last post by:
Dear all, When I use #include "queue.h", I can't link it. The error message follows: Linking... G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x136): In function `main':...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.