|
I am developing a web service application using ASP.NET and the MS WSE (Web Service Enhancements). On the server side, there is an asmx file running on IIS wich is able to recieve a SOAP message with a DIME attachment (e.g. an *.gif).
Now I am developing a client that can send those messages with a DIME attachment.
Here's the basic method I am trying to implement:
// ***********
SoapContext *reqC = RequestSoapContext::Current;
DimeAttachment *dimeAttach = new DimeAttachment(
"image/gif", TypeFormat::MediaType,
"C:\\temp\\IMG_3621.jpg");
reqC->Attachments->Add(dimeAttach); //System.NullReferenceException???
// ************
When I am trying to build the programme, the process breaks with an exception, claiming there was a "System.NullReferenceException" (Object reference not set to an instance of an object)in the last line of code posted above.
What does that mean?
The above method is taken from a MSDN example wich is also quoted here on codeproject.com (http://www.codeproject.com/soap/DimeTest.asp). In the examples it is used as a server method (the server sends a SOAP message with a DIME attachment on client request), but I need it as a client method so I changed the SoapContext into a "RequestSoapContext" instead of a "ResponseSoapContext".
I did include all the necessary namespaces and headers, the compiler accepts all commands without throwing any errors, the error appears during build/debug.
The examples are in C# but I am not familiar with it so I need to be doing it in C++.
Thank you in advance for any hints!
P.S: I am not a native english speaker- please excuse my faults.
|
|
|
|
|
Hi,
I'm using CFileDialog and have setup the extensions etc and it seems to work correctly.
The only problem is that if a type a non existent filename into the filename text box and select open CFileDialog exits (DoModal returns IDOK).
Surely I don't have to check that the file from calling GetPathName() exists?
Cheers,
Ally
|
|
|
|
|
Why not use OFN_FILEMUSTEXIST ?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Thanks for that got it sorted. I knew there must be a way to do it.
|
|
|
|
|
Hi,
I tried both TB_PRESSBUTTON and WM_LBUTTONDOWN, but I failed. Do you have any ideas to solve this problem?
Thanks in advance.
|
|
|
|
|
do you need a visual feedback ?
Toolbar buttons are COMMANDS, so , you could ( never tried it ) do a SendMessage with the appropriate command ID.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I would do a PostMessage myself...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi,
I tried to send the WM_COMMAND to my toolbar, it worked. But it failed when I sent that message to the toolbar of the Open File Dialog (CFileDialog). Here is my code:
<br />
hwndToolBar = ::FindWindowEx(hwndParent, NULL, _T("ToolbarWindow32"), NULL);<br />
::SendMessage(hwndToolBar, WM_COMMAND, MAKEWPARAM((WORD)40961, CN_COMMAND), NULL);
I didn't know why it failed. Please help me. What I need is programmatically clicking on the "Up One Level" button.
Thanks in advance.
-- modified at 14:39 Thursday 15th December, 2005
|
|
|
|
|
Are you sure the FindWindowEx returns an HWND? Perhaps it returns NULL.
|
|
|
|
|
It works now. The problem is that when I send the message. It wouldn't work in WM_INITDIALOG and WM_NOTIFY (code CDN_INITDONE). It worked well in WM_NOTIFY (code CDN_SELCHANGE and probably others but I've not tested yet!)
Thanks for helping.
|
|
|
|
|
That's cool, but to be safe, you should always check if FindWindow(Ex) succeeds before using the HWND.
|
|
|
|
|
Hi,
In Win32 app...is there any way to find the Windows Monitor number programatically???
Thanks.
|
|
|
|
|
Manu_81 wrote: Windows Monitor n
What's this? Do you mean the monitor's model number?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
In multiple display monitor environment, windows assigns each monitor a monitor number 1,2,3...so on. I want to retrive that info for all the available display monitors.
Thanks.
|
|
|
|
|
How about EnumDisplayDevices() ?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: What's this? Do you mean the monitor's model number?
He wants to know the default monitor in a multiple monitor setup.
|
|
|
|
|
You could read this registry key :-
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\DISPLAY\Default_Monitor
|
|
|
|
|
Hello All
Has anyone ever seen any discussions on how simple an installation package should be for the average user? We have a requirement that our installshield installation package should be customer installable, meaning that the average user should be able to correctly launch and run the installation package and end up with a working software package. I am wondering, how do you test this, where are the measurable criteria?
Thanks for your time and ideas. Also, sorry for being a bit off topic.
Patrick
|
|
|
|
|
Usually you would offer two options, as is fairly common with many setup programs.
Typical and Custom setup types.
Your 'typical' user can just select Typical , and your setup installs all normal user stuff - probably leaving out SDKs, advanced documentation, or advanced or rarely used features. Custom let's them get whatever they want. Another third option is sometimes Full which means just install everything. Usually those two or three options are sufficient.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Hi folks,
We have a large MFC application here, and we've been asked to plug a couple of third party controls into it. These controls are for .net (from Dundas) - is it possible to use .net controls/code in MFC applications? We're currently using Visual Studio 2003 if that makes a difference.
-Dy
|
|
|
|
|
|
He's asking about merging two apps, I'm asking about extending an app, which is very different.
Plus, I've no choice to make, we're on MFC and will be staying there. Just wondering if I can make use of the .net stuff that's out there within my MFC apps, or if I will need to stick to Windows API and MFC stuff only?
-Dy
Help me raise money for the RNIB
|
|
|
|
|
While you can use .NET controls in MFC apps in VC 2003, it's a lot more easier with VC 2005, because MFC has some new WinForms interaction classes.
|
|
|
|
|
Fantastic!
We're going to be evaluation '05 pretty soon... In the mean time, do you know of any web resources / articles here on CP about doing it in '03? I've had a look here and on MSDN, but didn't spot anything.
-Dy
|
|
|
|