|
Hi Hamid and Xing,
Many many thanks for your suggestion. I tried what both of you have said. But that was giving "error C2712: Cannot use __try in functions that require object unwinding" in my VS 2005. Anyway I solved that error by setting "Enable C++ Exceptions" to "No". Now I can track the exception, though generating too many warnings at compile time (for disabling C++ exceptions). So, the application doesn't crashes anymore.
Anyway, I need to show the GIF images. So, how can I do that after getting that exception - EXCEPTION_EXECUTE_HANDLER. What should I do 
|
|
|
|
|
|
Hi Xing,
Thanks for your enthuasism, what you and Hamid have shown to my problem.
I used that __try-__exception() block. Inside that I call 'GetExceptionCode' API, which returns me the error code 0x80000003. It means EXCEPTION_BREAKPOINT (#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT in winbase.h). And in winnt.h STATUS_BREAKPOINT is defined as 0x80000003. So, right now I am here, back again in the square.
I don't understand what is the problem with Application Verifier 4.0. Without tracking by it, the application works fine.
|
|
|
|
|
I guess Application Verifier use more strict strategy, just like you can compile project with /W4 option.
|
|
|
|
|
what are the changes required to open a vs 2008 project into vs 2005?
|
|
|
|
|
Purish Dwivedi wrote: what are the changes required to open a vs 2008 project into vs 2005?
Don't think that it would be easy to do this. you may better ask this in the Visual Studio Forum
You can create a new project in VS2005 and add your existing files from VS2008 to this project. Be careful that you are not using API's added in VS2008 in your code.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
It's not working.
It needs some change in version in the .sln file,I think so....
|
|
|
|
|
What is not working? The idea given by me or opening Vs2008 file in Vs2005 fails. I think the format for the two version's .sln files would also be different.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: Be careful that you are not using API's added in VS2008 in your code.
There are no APIs that 'belongs' to any particular version of VS. You're probably talking about the SDK.
Or, if you were talking about compiler specific features like the TR1 library extensions, then there would be no way to run it on a compiler that doesn't implement it anyways.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hello
If you are just using standard features which are also available with VS2005, just change version number to 8.0 and also do relative changes and apply the same for vcproj file (just version number change,etc.). I learnt this in here from someone couple of weeks ago and it is working for me so far.
Hope this helps.
Bekir.
|
|
|
|
|
one more thing needs change except version number.
I don't remember exactly. Hope u can find out...
Thanks for reply.
|
|
|
|
|
only the version strings at the beginning of the *.sln and the included *.vcproj files!!! I make sometimes "myproj2008.sln" and "myproj2005.sln" files because of some reasons.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
|
I want to Design a client class to connect with asp.NET webservice
i m using soapsud toolkit and msvisalstdio 2008 and Project type is mfc dialog based
CoInitialize(NULL);
ISoapSerializerPtr Serializer;
ISoapReaderPtr Reader;
ISoapConnectorPtr Connector;
Connector.CreateInstance(__uuidof(HttpConnector));
Connector->Property["EndPointURL"] = "http://localhost/PC_Stub/PaymentCloud.svc";
Connector->Connect();
Connector->Property["SoapAction"]= "http://localhost/PC_Stub/PaymentCloud.svc";
Connector->BeginMessage();
Serializer.CreateInstance(__uuidof(SoapSerializer));
Serializer->Init(_variant_t((IUnknown*)Connector->InputStream));
Serializer->startEnvelope("","","");
Serializer->startBody("");
Serializer->startElement("isuseronline",
"http://localhost/PC_Stub/PaymentCloud.svc",
"",
"m");
Serializer->startElement("CustomerID","87654321");
Serializer->writeString("CustomerID");
Serializer->endElement();
Serializer->endElement();
Serializer->endBody();
Serializer->endEnvelope();
Connector->EndMessage();
Reader.CreateInstance(__uuidof(SoapReader));
Reader->Load(_variant_t((IUnknown*)Connector->OutputStream),
"");
((const char *)Reader->RPCResult->text);
CString s=Reader->RPCResult ->text;
AfxMessageBox(CString(W2T(Reader->RPCResult->text)));
CoUninitialize();
But its giving no results plz suggest how to build c++ client ( i want to pass parameters to service so using (MFC dialogs))
|
|
|
|
|
As a quick note, I've never worked with SDL before.
Basically, what I'm trying to play a movie file, and it slowed down way too much by converting a frame to a PPM file, loading it up using freeimage, and then displaying it. (most of the performance hit actually came from freeimage loading the PPM, and I tried converting to BMP and loading the BMP file into an HIMAGE but that took even longer)
Anyways, I don't want to rewrite the rest of my code to use SDL if I don't have to, so is there any way I can use SDL to output to an HDC instead of an SDL_Surface?
|
|
|
|
|
I don't think you will be able to mix GDI and SDL to draw on the same window. But, I'm not sure about it.
Anyway, what I wanted to point out is why is this a problem ? Are you loading your image each frame ? If the load time is long, this is not really a problem because it happens only once, when your image is first loaded in memory. If you reload the image for each frame, then you are doing something seriously wrong...
|
|
|
|
|
Well, it's an MPG file, and the only way I could find that works well with my program so far is to rip one frame at a time to a PPM file, then display that file to the screen. All my other sprites are loaded just once, but the only way I could preload the video is if I ripped every single frame ahead of time and loaded them all into a giant array of HBITMAPs (which would take longer to load than the video actually lasts.) The next best thing I could find was to use VMR9 to display the movie, but it doesn't get along with GDI at all, so that plan was out.
Although I did realize that I was actually loading the frame every time the game updated, rather than just when there's a new frame. I think I'll try fixing that before I port everything to SDL.
|
|
|
|
|
I get this error when I compile my win32 library here is my code below
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// TODO: reference additional headers your program requires here
class MemManage
{
public:
static void MmgMem(char cStr, char x, int strLenght);
}
// MemoryManagement.cpp : Defines the exported functions for the DLL application.
//
#include <stdio.h>
#include <string.h>
#include "stdafx.h"
MemManage::MmgMem(char cStr, char x, int strLenght)
{
memset(cStr,x,strLenght);
puts(cStr);
return 0;
}
then the error is pointing here
// stdafx.cpp : source file that includes just the standard includes
// MemoryManagement.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
Thanks,
Chris
|
|
|
|
|
chris_kuizon wrote:
class MemManage
{
public:
static void MmgMem(char cStr, char x, int strLenght);
}
You're missing a semi-colon off the end of the MemManage class definition.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I'm using VC++ Express Edition.
The Adobe Acrobat sdk is a zip file located here:
http://download.macromedia.com/pub/developer/acrobat/sdk/9/sdk9_v1_win.zip[^]
My stdafx.h has:
#import "c:\junk\adobe\acrobat.tlb" no_namespace
My main.cpp is:
#include "stdafx.h"<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
AcroApp app;<br />
return 0;<br />
}<br />
When I compile I get the following error:
error C2079: 'app' uses undefined struct 'AcroApp'
If I change "AcroApp app;" to "AcroApp* app" it compiles with only a warning that "app" is an "unreferenced local variable".
It looks like VC++EE created the acrobat.tlh and "knows" about the AcroApp/CAcroApp type.
The acrobat.tlh shows that CAcroApp inherits from IDispatch[^], so I'm assuming that is COM related.
I guess my question is... how to I create an instance of the AcroApp class?
|
|
|
|
|
Looks like this might be what I want:
stdafx.h:
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include <iostream>
#include <windows.h>
#import "c:\junk\adobe\acrobat.tlb" no_namespace
main.cpp:
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize( NULL );
CAcroApp* app = NULL;
LPOLESTR lpolestr;
StringFromCLSID(__uuidof(AcroApp), &lpolestr);
wprintf_s(L"\n%s", lpolestr);
CoTaskMemFree(lpolestr);
HRESULT hr = CoCreateInstance(
__uuidof( AcroApp )
,NULL
, CLSCTX_ALL
,__uuidof( AcroApp )
,(void**) &app
)
;
wprintf( L"\nHRESULT=%d", hr );
if( SUCCEEDED( hr ) ){
wprintf( L"\nSUCCESS!! : %d", hr );
app->Release();
app = NULL;
return 0;
}else{
wprintf( L"\nFAILED!! : %d", hr );
return 1;
}
}
The best part about this is there aren't any com-specific headers that are NOT included in the VC++ Express Edition.
|
|
|
|
|
Any advice on app scripting? I have a native C++ MFC application running on Windows. I'd like tech-savvy users to be able to write scripts to interact/control the app locally and/or remotely.
I've looked into exposing OLE Automation interfaces, but am not sure thats the best way to go or how easy the remote piece will be for end users.
I want the app to provide the scripting services in process and want to minimize complexity for users developing scripts to control the app locally or remotely.
Anyway, just wondering what the latest thoughts are on the best way to approach this. Any suggestions?
|
|
|
|
|
Your application may host the Windows Script Control [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How difficult is it to access this from a remote machine?
|
|
|
|
|
I don't know. What exactly do you need to do?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|