473,789 Members | 2,668 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 3087
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
5130
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
2941
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
3552
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
4355
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
3015
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
5156
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
9666
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...
1
10142
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
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
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
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.