|
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]
|
|
|
|
|
Dear All,
I have a project with so many static variables accessed from one class to another class. I access these static variables by threads.
For example, I access one variable in one thread to change the value and another thread to access it. Both threads are running concurrently. But sometime abruptly the static variable value got changed and it holds a very big value which results in some problem.
I know that I use more static variables and I do mistake in programming but can anyone tell me avoid this kind of problem and why the variable is suddenly holding huge values.
Many thanks in advance.
Kind regards,
Bhanu
|
|
|
|
|
Are you sure all those variables are properly synchronized for concurrent accesses?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Sorry I don't use any synchronization for the variables. But one thread is reading and another thread is writing. Please help me how to synchronize the variables.
Many thanks for your reply.
|
|
|
|
|
It sounds like you read the variable halfway through being changed. So, the variable is not a trivial type (ie, BOOL).
Look at CCriticalSection, it's probably what you need. There's a million and one way to do this though. You could wrap the variable in a class including the CCriticalSection, and write get / set routines that use the critsect.
It really depends on the fine details.
If you have loads of static variables, it makes me suspect your initial design though. May be worth a second look. Does PlaceA need to know details of PlaceB?
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke wrote:
If you have loads of static variables, it makes me suspect your initial design though. May be worth a second look. Does PlaceA need to know details of PlaceB?
Yes PlaceA need to know the details of PlaceB. Can you please suggest me a quick way to overcome this problem.
|
|
|
|
|
bhanu_8509 wrote: Can you please suggest me a quick way to overcome this problem.
No, only the slow way of proper design, and wrapping access to complex variables in critical sections.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke wrote: No, only the slow way of proper design, and wrapping access to complex variables in critical sections.
Well said, Euclid, with his "there is no royal road to geometry" is a newbie.
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]
|
|
|
|
|
bhanu_8509 wrote: I have a project with so many static variables accessed from one class to another class. I access these static variables by threads.
That's your problem. Is it possible in your case to send messages between threads, rather than accessing static variables directly?
|
|
|
|
|
If the variables are not volatile, you're already in trouble. The ideal way would be to synchronize access to the variable using thread synchronization techniques (a critical section would do, as all your threads belong to the same process).
I see you have a lot of things to read up.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hello All,
Can some one please tell me how to access the settings in gpedit.msc using VC++?
I need to set/reset various options from the gpedit.msc.
Thanks in advance.
|
|
|
|
|
I think all these options are under "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy"
|
|
|
|