|
How do I access a web service over SSL?
My client app works with "http://..." but doesn't work with "https://..." . I've managed to create a proxy class with "https://..." but calling any function gives me "SOAPCLIENT_SEND_ERROR" .
Solutions found by google tells me that I should either use Wininet function or CInternetSession but I'm reluctant to make major changes such as rewriting the proxy class generated by VS2005.
|
|
|
|
|
This could be a hack. I don't know.
Initially, my proxy class was derived from CSoapSocketClientT . So, I've changed it to derive from CSoapWininetClient instead.
template <typename TClient = CSoapWininetClient >
This solution seems to work. Also, I had to remove the web reference(*.disco, *.wsdl, *.discomap) from my solution explorer to prevent it from refreshing the proxy class file.
|
|
|
|
|
Hi,
Time ago I began to create some static libraries of functions/classes in that I frequently use in my apps. Classes that uses MFC stuff is in one library and the rest of the stuff classified in another five.
I "think" (please confirm) that having multiple library files make manteniance and changes compiling faster. Also I "believe" that Visual Studio compiler will be smart enough to NOT include all the object files of classes I don't use in my final executable.
The question, including my 2 "thinks" above, is: "using separate library files has a real benefit?"
Thanks, Mauro.
|
|
|
|
|
You are correct on both counts.
I would also suggest you convert the static libraries into dynamic libraries 'cause then you have a lot more options of either linking it implicitly or explicitly or even delay loading the DLL.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes. I was thinking in turning some libraries into dlls. I'm not friend of having an app of one .exe and lots of .dll, but sometimes there aren't other options.
Best regards, Mauro.
|
|
|
|
|
I am currently writing an application using C++ and MFC. For displaying the results of a certain operation, a new window is created. The window is represented by a class I created called COutputWindow. The base class of COutputWindow is CFrameWnd. I create the output window by doing the following operations:
1) Creating a new instance of COutputWindow by calling new.
2) Calling the member functions of COutputWindow: ShowWindow and UpdateWindow. Actually these
member functions are defined in the base class.
3) A define COutputWindow::OnPaint to display the results.
In my main window, I save a pointer to the output window. In addition, when the output window (window of type COutputWindow) is closed, I want the objected created by new in step 1 to be deleted. However, I cannot do this until the window is completely closed. Therefore, I believe that the pointer cannot be deleted on COutputWindow::OnClose. Therefore, where should I delete the pointer that represnets the object to the closed window.
Thanks
Bob
|
|
|
|
|
You should set the pointer to the output window to NULL in the OnDestroy callback and override the PostNcDestroy function in order to add a "delete this;" statement.
Best regards,
Mauro H. Leggieri
|
|
|
|
|
You are not doing any polymorphic operations.
Also you do not need any runtime information for creating the window.
So I suggest you go for a stack variable instead of using new and simply show/hide the window.
This will also work faster.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Or, the common refrain for large projects and pointers?
I am working with some licensed software, so some type/function names are abbreviated as <ObjName>.
void success( const <ObjName>& fir_)
{
firtemp = new <ObjName>(fir_);
std::ofstream firOut;
firOut.open( firFile.c_str(), std::ios::binary|std::ios::out|std::ios::trunc);
firOut << *firtemp;
firOut.close();
}
This is a member function of a class (it is defined inline here) which has a member variable
<ObjName> * firtemp; . firFile is a file-level const string variable.
The licensed software object <objName>> does provide an overloaded definition for the "<<" operator, and the example I'm following uses it in exactly the way I use it above to save the firtemp object to a file.
When I attempt to run this code, the firOut << *firtemp line results in a memory access violation which is fairly consistent ... it moves around very little, as in < 16 bytes or so.
One of the things i've noticed while trying to debug this error is that when I set firtemp as a watch (I'm using VS2005), and set break points at the start of the function then step through ... the value of firtemp changes wildly. Is this expected? Also, if I insert a cout statement for the value of firtemp, it does not agree at all with the value the debugger gives ... again, I'm not sure what to expect here.
Now, in the "Autos" field in the debugger, the "this" parameter has its value in red text for most of this function call ... is this normal? If not, what does it indicate? I searched online and could find no references for this simple question.
Primary Question: Is there anything obviously wrong with what I'm doing here, or is the error having to do with the licensed code/my interface to it? Any hints for trying to find the error, if it is in my interface?
|
|
|
|
|
Don't know if this will help, but why are you creating firtemp on the heap? I would try creating a stack based variable and see what is going on.
|
|
|
|
|
A good question - the example is doing it because there are other member functions that might want to access the object and there is no default constructor for it, so you can't easily have a member variable of the actual object type ... having a pointer is comprise solution.
However, for my useage this is not needed, and I did rewrite it with a local variable/stack allocation. Unfortunately I get exactly the same error. What I may not have noted in the original post is that I can definitely write to the file this attempts to write to, and I can access other member functions of the object, for instance a size() function, with no errors.
|
|
|
|
|
Ok, let's say that we have an application that supports DLL calls, and on every routine call to the DLL, the application's main handle (HWND) is passed.
Example:int __stdcall TheFunction(HWND mWnd)
Now, let's say that the application has a dialog that I want to modify (IE: Change the caption or coloring of text inside an edit box within the dialog). How would I go about gaining control of the dialog handle?
There is no "resource" file for the program, but I have already acquired the dialog ID and control identifier as well, which is located at: http://pastebin.com/ffbc560f
Dialog ID: 740
Control Identifier: 300
|
|
|
|
|
You'd need the application to cooperate, I think. It needs to give you the chance to subclass the dialog (not going to happen without the apps help, one way or another).
Even hooking into the resources won't help - the dialogproc isn't coded in the resources.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Ahh, thank you "Subclassing" is the term I was actually looking for.
|
|
|
|
|
Hi
I am unable to install platform SDK on Vista Operating System.
Each time a information bar is populated when i click on Default.htm file .
Is there any other way to Install Plateform SDK . I have used many hit and trial methods .
I have posted a query previously in the same forum . Naveen sir has suggested that Choose 'Run as administrator'.. I have also tried but same information bar which we normally see when a website tries to install some active x on computer . The information message displays 'Your security settings do not allow website to use Active X Controls installed on your computer. This page may not display correctly'.
I have clicked on this bar and done same changes in my security setting as seen in more information option .But still i am not able to install Plateform SDK..
Please tell me some way to overcome this problem..
'
|
|
|
|
|
How exactly are you trying to install the SDK and which one? I just recently installed the latest platform SDK and didn't have to do anything with default.htm, and in fact can't understand were you would have to. The download comes in ISO form and is about a 1.3GB file. You simply mount the iso with PowwerISO or something similar and run setup.exe.
Dustin
|
|
|
|
|
I am trying to install
Windows SDK Windows .NET Server 2003 RC2 (October 2002). I am having an installation folder which contains diffrent html files , for starting the setup i clicked on default.html file which is suppose to install the whole setup displaying page by page information . The size of my installation folder is 570 MB ..
I have previously installed this platform sdk but on xp operating system..
|
|
|
|
|
I m using SQL Server 2000 as my database.I would like to know what parameter should i pass as Provider in my Open( ) function. ?
hr = m_pConnection->Open(_bstr_t(L"Provider=(WHAT PARAMETER);Data Source=C:\\Program Files\\Microsoft SQLServer\\MSSQLDataLibDB.mdf;"),_bstr_t(L""),_bstr_t(L""),adModeUnknown);
|
|
|
|
|
See here [^].
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]
|
|
|
|
|
Hi,
I noticed MFC implementation of sockets provides notification thru messages
I have a modless CDialog that needs to make use of TCP/IP services
can I use this CDialog's Message Map to receive the TCP/IP messages
Also rather then have it or a pointer to It (it being the CAsyncSocket Class or
probably my deravation of it as I would like to sprouse it up a bit)
I would like to use it as a Base Class even though there really isn't any
relationship between my CDialog and my implementation of CAysncObject
outside of the fact that I need a CWnd Class for messages
I welcome your critique('s) as that is a way I learn
|
|
|
|
|
ForNow wrote: I would like to use it as a Base Class...
Why? What other methods or properties do you need?
ForNow wrote: ...even though there really isn't any relationship between my CDialog and my implementation of CAysncObject...
There likely is a "has-a" relationship (rather than a "is-a" reelationship mentioned earlier).
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
To answer yor first question
for the CAsyncSocket type object I would like to add a buffer of char or TCHAR type
for the data that is being received
Any for the second question
I guess dervation of classes isn't not mean to be a "glue" meaning if a object
just needs use of a Class but has not relationship it should be made a member
truth is since you are taking your valuable time to answer (I mean not being
facetious)
I should give a better overview this Windows MFC app is communacting with a) Console
application b) A program on a different platform (non Windows)
For first (Dos Console) I Created a Object of type CWinthread and use Named pipes
to Communicate
For (b) seems like TCP/IP is the unversial Language
MFC implmentation is CAsycSocket truth is I would like to run this (this "not
instance" just a joke, but this CAysncSocket type object as a Seprate thread
with the currently running Cdialog receving the notification messages
I guess if a create a Thread that uses messages I have to use those DYNCREATE macros
thankx again
|
|
|
|
|
ForNow wrote: ...this CAysncSocket type object as a Seprate thread...
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thankx
A couple questions is passing a object as a parm dangerous only to C"Async"Socket
objects
but if were to to pass a object if another type it would work say um.... CEvent
Object
BTW
the MainFrame has a similar Concept
After Accetping a connection there is a GiveSocket API to give the socket to the
Subtask or Subthread
|
|
|
|
|
or ??? is any object that has am Attach() method dangerous to pass across thread boundries
|
|
|
|