|
Austrian_Programmer wrote: ShellExecute(NULL, (LPCWSTR)pcOp, (LPCWSTR)pcPath, NULL, NULL, SW_SHOWNORMAL);
As I run this code I didn't get any error messages but nothing happened.
What am I doing wrong?
Casting char*s to wchar_t*s is not good.
You shouldn't use casts unless absolutely necessary. If it doesn't compile without
the casts, then I recommend looking at the types involved before covering the problem
with a cast.
Mark
|
|
|
|
|
Can we use the directshow methods in VC++ windows forms application. I have worked in VC++ MFC using Dshow methods and dont know how to use in VC++ Windows forms application. I got linker error when I use the Dshow methods, also I specified all the libraries in Project properties. Please advice.
Many thanks in advance.
|
|
|
|
|
What are the errors exactly?
Mark
|
|
|
|
|
1>------ Build started: Project: AV2USB, Configuration: Debug Win32 ------
1>Linking...
1>AV2USB.obj : error LNK2020: unresolved token (0A00000E) IID_IAMStreamConfig
1>AV2USB.obj : error LNK2020: unresolved token (0A00000F) IID_IBaseFilter
1>AV2USB.obj : error LNK2028: unresolved token (0A000011) "extern "C" void __stdcall VariantInit(struct tagVARIANT *)" (?VariantInit@@$$J14YGXPAUtagVARIANT@@@Z) referenced in function "private: void __clrcall AV2USB::Form1::button4_Click(class System::Object ^,class System::EventArgs ^)" (?button4_Click@Form1@AV2USB@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
1>AV2USB.obj : error LNK2020: unresolved token (0A000012) IID_IPropertyBag
1>AV2USB.obj : error LNK2020: unresolved token (0A000013) IID_ICreateDevEnum
1>AV2USB.obj : error LNK2020: unresolved token (0A000014) IID_ICaptureGraphBuilder2
1>AV2USB.obj : error LNK2020: unresolved token (0A000015) IID_IGraphBuilder
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_IAMStreamConfig
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_IBaseFilter
1>AV2USB.obj : error LNK2019: unresolved external symbol "extern "C" void __stdcall VariantInit(struct tagVARIANT *)" (?VariantInit@@$$J14YGXPAUtagVARIANT@@@Z) referenced in function "private: void __clrcall AV2USB::Form1::button4_Click(class System::Object ^,class System::EventArgs ^)" (?button4_Click@Form1@AV2USB@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_IPropertyBag
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_ICreateDevEnum
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_ICaptureGraphBuilder2
1>AV2USB.obj : error LNK2001: unresolved external symbol IID_IGraphBuilder
1>E:\GUI\AV2USB\Debug\AV2USB.exe : fatal error LNK1120: 14 unresolved externals
1>Build log was saved at "file://e:\GUI\AV2USB\AV2USB\Debug\BuildLog.htm"
1>AV2USB - 15 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
|
|
|
You've included Strmiids.lib and Dxguid.lib in your build?
|
|
|
|
|
I have added Strmiids.lib already and tried including Dxguid.lib but still I got the same linker errors. Please help me if I miss something. The other libraries included are strmiids.lib strmbase.lib winmm.lib SetupApi.lib strmbasd.lib Dxguid.lib Quartz.lib ole32.lib. In addition to this there are default inherited libraries. They are as follows
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
More interestingly, when I remove the libraries from the Project Properties->Linker->Input, I got the same errors. Please advice.
modified on Friday, June 27, 2008 6:13 AM
|
|
|
|
|
hmm the only thing I can think of is you've got the wrong SDK.
What version of Visual Studio?
What SDK version are you using?
Mark
|
|
|
|
|
Mark Salsbery wrote: What version of Visual Studio?
Visual Studio 2005
Mark Salsbery wrote: What SDK version are you using?
Microsoft Platform SDK for Windows Server 2003 R2
For your information, everything works fine with VC++ MFC and the problem now facing is with VC++ Windows application forms.
|
|
|
|
|
bhanu_8509 wrote: Windows application forms
As in .NET Forms (C++/CLR)?
In your VS settings (Tools/Options/Projects and Solutions/VC++ Directories)
are the header and lib folders for the PSDK searched BEFORE the default VS SDK
folders?
Do you use a stdafx.h file? If so, what's in there exactly?
|
|
|
|
|
Mark Salsbery wrote: As in .NET Forms (C++/CLR)?
I cant understand it. Please kindly explain me.
Mark Salsbery wrote: Do you use a stdafx.h file? If so, what's in there exactly?
#include <initguid.h>
#include <Strmif.h>
#include <Dshow.h>
Mark Salsbery wrote: In your VS settings (Tools/Options/Projects and Solutions/VC++ Directories)
are the header and lib folders for the PSDK searched BEFORE the default VS SDK
folders?
In the directory settings PSDK directories and libraries are included at the last ( I mean after the default VS SDK ).
Thanks for your prompt reply. I need some assistance very much to solve this issue.
|
|
|
|
|
That's all that's in your stdafx.h file?
bhanu_8509 wrote: In the directory settings PSDK directories and libraries are included at the last ( I mean after the default VS SDK ).
They need to be at the top! You want the headers and libraries from the PSDK Server 2003R2,
not the ones included with VS2005.
Note that in VS2008, the SDK is up to date with the addition of DirectShow, so the secondary
PSDK isn't necessary.
|
|
|
|
|
Mark Salsbery wrote: They need to be at the top! You want the headers and libraries from the PSDK Server 2003R2,
not the ones included with VS2005.
I got 88 errors after specifying PSDK above all. One of the error is
1>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\strsafe.h(431) : error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe
Please advice.
|
|
|
|
|
bhanu_8509 wrote: Please advice.
The PSDK is native code right? You can't compile native code in a Pure managed project. The project has to be set up for mixed mode to use native code.
led mike
|
|
|
|
|
Can you please explain how to do this.
|
|
|
|
|
Can you please tell me how to do this. Please...
|
|
|
|
|
bhanu_8509 wrote: Please advice
See led mike's reply.
|
|
|
|
|
By the way, I just realized you're asking in the Managed C++/CLR forum,
so my Windows Forms question was silly
Mark
|
|
|
|
|
I didn't understand your above reply. Please tell me is it possible to include Directshow in VC++ windows application forms.
|
|
|
|
|
Yes it's possible - I mix native and managed C++ and use DirectShow and other
Windows Media SDKs.
Your build environment MUST be configured properly!
|
|
|
|
|
Please tell me how to configure it
|
|
|
|
|
1) First you need to change your project settings to use /clr WITHOUT the :pure or :safe.
Right click the project in solution explorer, choose properties -
General/Common Language Runtime Support
If your assembly MUST be pure, then you'll need to use interop or the managed wrappers
for DirectShow, and none of the following applies.
2) Try starting with a stdafx file with the following:
#pragma once
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <dshow.h>
Set the version macros to target the operating system version you want to target.
3) Make sure you've set your VC++ directories to use the PSDK 2003 R2 files BEFORE using
the VS Windows SDK files, as we discussed already.
4) Make sure you include the following library in your project: Strmiids.lib
|
|
|
|
|
Dearest Mark,
Thank you for your valuable guidance. The code is working now and I have to migrate my code from MFC to windows forms. Thank you so much and very kind of you.
Thanks and Kind regards.
|
|
|
|
|
I have a wsdl generated by axis2. My project is developed in VC++ using Visual Studio2008. Now, when I add a web reference to the project I get a lot of syntax errors and schema warnings.
Following is a snippet of the generated error
1>------ Build started: Project: TrumpotConsole, Configuration: Debug Win32 ------
1>Creating web service proxy file for HermesCoreService ...
1>Schema validation warning: Schema item 'element' named 'getContactResponse' from namespace 'http://quickstart.samples/xsd' is invalid. Namespace 'http://pojo.webservice.hermes.com/xsd' is not available to be referenced in this schema.
1>Schema validation warning: Schema item 'element' named 'getNotificationResponse' from namespace 'http://quickstart.samples/xsd' is invalid. Namespace 'http://pojo.webservice.hermes.com/xsd' is not available to be referenced in this schema.
1>Writing file 'HermesCoreService.h'.
1>HermesCoreService.h
1>HermesCoreService.h(49) : error C2059: syntax error : 'public'
1>HermesCoreService.h(49) : error C2027: use of undefined type 'HermesCoreService::HermesCoreService'
1> HermesCoreService.h(22) : see declaration of 'HermesCoreService::HermesCoreService'
1>HermesCoreService.h(53) : error C2059: syntax error : 'public'
1>HermesCoreService.h(53) : error C2027: use of undefined type 'HermesCoreService::HermesCoreService'
1> HermesCoreService.h(22) : see declaration of 'HermesCoreService::HermesCoreService'
1>HermesCoreService.h(151) : error C2146: syntax error : missing ';' before identifier 'getUpdatesCompletedEventHandler'
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>HermesCoreService.h(151) : error C2143: syntax error : missing ';' before '^'
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
The first few lines of the HemesCoreservice.h are as follows
#pragma once
#using <mscorlib.dll>
#using <system.dll>
#using <system.xml.dll>
#using <system.web.services.dll>
#using <system.enterpriseservices.dll>
using namespace System::Security::Permissions;
[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];
//
// This source code was auto-generated by wsdl, Version=2.0.50727.1432.
//
namespace HermesCoreService {
using namespace System::Diagnostics;
using namespace System::Web::Services;
using namespace System::ComponentModel;
using namespace System::Web::Services::Protocols;
using namespace System;
using namespace System::Xml::Serialization;
using namespace System;
ref class HermesCoreService; // this is line no 22
ref class Updates;
and the HemesCorService.wsdl
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://quickstart.samples/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://pojo.webservice.hermes.com/xsd" targetnamespace="http://quickstart.samples/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation>HermesCoreService</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax21="http://pojo.webservice.hermes.com/xsd" attributeformdefault="qualified" elementformdefault="qualified" targetnamespace="http://pojo.webservice.hermes.com/xsd">
<xs:complextype name="Contact">
<xs:sequence>
<xs:element minoccurs="0" name="contactGroup" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="firstName" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="gender" type="xs:int" />
<xs:element minoccurs="0" name="lastIp" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="lastName" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="status" type="xs:int" />
<xs:element minoccurs="0" name="userAvatarLink" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="userId" type="xs:int" />
<xs:element minoccurs="0" name="userNick" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="userSessionId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complextype> </xs:schema></wsdl:types></wsdl:definitions></system.enterpriseservices.dll></system.web.services.dll></system.xml.dll></system.dll></mscorlib.dll>
modified on Monday, June 23, 2008 10:16 PM
|
|
|
|
|
Look at your post. You need to check the box for ignoring HTML tags otherwise the '<' and '>' don't post.
led mike
|
|
|
|
|
Hello guys,
does anyone here have experience with Dark GDK?
I'm just trying it out but I have a lot of problems with it.
Thanks for your help.
|
|
|
|