473,803 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VC++ ("include" problemand directx,platfor m 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\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(221) :
error C3641: 'StringCchCopyA ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(222) :
error C3641: 'StringCchCopyW ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.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 3088
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\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(221) :
error C3641: 'StringCchCopyA ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(222) :
error C3641: 'StringCchCopyW ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.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.publi c.* 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\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(221) :
error C3641: 'StringCchCopyA ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.h(222) :
error C3641: 'StringCchCopyW ' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Micr osoft DirectX SDK (April 2007)\Include\s trsafe.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.publi c.* 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
5132
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 relative NOT to the immediate script that is including it, but is relative to the top-level calling script. In practice, this means that you have to constantly worry and adjust paths in includes, based on the startup scripts that call these...
2
2942
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 driven. The regex would include if/then/else type logic, and would like my script to conditionally execute the logic. -- http://www.dbForumz.com/ This article was posted by author's request
5
6097
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 slightly to adjust path names and also take into account I am working with a case-sensitive OS. My program is below. The sticky point is that adding (#include "util.h") seems to negate the (#include <string>) statement somehow. How can I get...
7
3554
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 way to do this in 3 steps: 1. Add in main_file.cpp
6
4359
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 result in any way. Who can help me, I thank you very very much. list.cpp(main program) //-------------------------------------------------------------------------- - #pragma hdrstop #pragma argsused
2
2296
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
3016
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 this: #include "pathname/file"
3
5159
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': G:\Projects\Datastructure\Queue\main.cpp:16: undefined reference to `Queue<char>::Queue()' G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x394): In function `Z10do_commandcR5QueueIcE':
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9566
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10300
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9127
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.