|
I am trying to consume a web service via a dll, I just want to pass in a variable length string that can be up to 5000 characters long, this string is is then passed directy to the web service. I have followed the example in the MSDN on creating a client that consumes a web service http://msdn2.microsoft.com/en-us/library/2k53kft2(VS.80).aspx which works fine but when I change the web service and calling methods to work with a string I get errors, any help on how I should do would be much appreciated.
also Im very new to C++
This is my DLL function that calls the web method.
extern "C" __declspec (dllexport) int __cdecl EMSWSTools(char *lpCmdLine) <br />
<br />
{<br />
using namespace std;<br />
int ret = 0;<br />
<br />
EMSSupTools::CEMSSupTools ws; <br />
<br />
<br />
HRESULT hr = ws.EMSHelper(lpCmdLine, &ret);<br />
if (SUCCEEDED(hr))<br />
return(ret);<br />
else<br />
return(0);<br />
}
|
|
|
|
|
rluckwell wrote: I get errors,
What types of errors are these ?
Add web reference for it again, deleting previous one.
Probably, proxy class and namespace added will be of difference name.
Prasad
MS MVP - VC++
|
|
|
|
|
The error is an AccessViolationException: - Attempted to read or write protected memory. this is often an indication the other memory is corrupt.
I have tried to re add the web reference. I have another web method the just returns an integer which works. I have also setup the test harness in VB that calls the web methods directly and this works fine to.
|
|
|
|
|
Does CFile::Read take a binary file?
|
|
|
|
|
|
Yes. CFile is designed toward binary file access.
It's basically a wrapper for the Windows CreateFile()/ReadFile()/WriteFile()/SetFilePointer()/
CloseHandle()/etc. APIs.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
CFile::Read("test.bin",CFile::modeRead) is the mode to read a binary file? or different flag? Thanks
|
|
|
|
|
From the docs: "One access permission and one share option are required"...
something like
CFile file(_T("pathname"), CFile::modeRead | CFile::shareDenyNone);
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I have written a custom expression evaluator add-in (EEAddIn) that I use with the Visual Studio .NET 2003 debugger to improve the display of certain C++ objects. The EEAddIn interface is very limited, however, and I would really like to be able to call GetExpression on the process being debugged while handling an EEAddIn callback. Unfortunately, GetExpression does not seem to work in this case.
I can use a separate add-in (EEAddInHelper) that calls GetExpression during an OnEnterBreakMode event handler to retrieve certain information from the debugged process. However, at this point I don't know the type that the expression evaluator is trying to display. Therefore, I am limited to retrieving certain general, static, type information from the process (e.g. the size of certain types that I am interested in handling in my EEAddIn).
If I try to call GetExpression while inside an EEAddIn callback, GetExpression returns E_FAIL and answers a NULL string. This happens regardless of the value of the UseAutoExpandRules parameter. I am invoking GetExpression from my EEAddInHelper, and I get a handle to this add-in via a call to GetModuleHandle in my EEAddIn callback handler. I am able to call other functions in EEAddInHelper to retrieve the static type information (which EEAddInHelper previously got by calling GetExpression in its OnEnterBreakMode handler), but direct (synchronous) calls to GetExpression always fail. Note that most of the ideas for my EEAddIn and EEAddInHelper come from http://www.codeproject.com/macro/CRCView.asp.
Does anyone know why GetExpression fails and whether there is a work-around? Would it help if I called GetExpression in a separate thread that I spawn while handling the EEAddIn callback? Are there any recommendations for debugging this problem?
Any help would be greatly appreciated.
Thanks.
|
|
|
|
|
Im using C++, and OpenGL. For some reason when I run my game on a AMD machine it has these skips. When I run it on an Intel it runs fine. It could have nothing to do with the CPU but I suspect it may have something to do with it (maybe QueryPerformance?)
Thanks for any help or advice.
|
|
|
|
|
R.A.V.E. wrote: it has these skips
What is a 'skip' ? What do you mean by that ?
|
|
|
|
|
The Objects jump/skip in the direction they're heading at random times.
|
|
|
|
|
I work with real-time graphics in flight simulation. It sounds like a timing problem more than anything. I'm not familiar with PC chips all that much, but it may be that the timing you've chosen to animate your objects can't be sustained at the rate you would like it to. In regular animation, the human eye can begin to detect 'stepping' at somewhere between 20-25 Hz (20-25 frames per second). So if you aren't displaying your scene faster than this, you are going to notice 'skipping' or 'stepping' of your scene objects. Hope this helps.
John P.
|
|
|
|
|
I am creating an application which has a list view control and you can drag and drop items into it - for example, from the explorer - which then processes the data and adds an entry to the list view. How would i implement this?
Thanks for your help,
--PerspX
|
|
|
|
|
Perspx wrote: How would i implement this?
Since CView provides the functionality, it should be handled automatically. What are you having trouble with?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Well i am using straight C/C++ with no classes so I am not sure how to handle drag and drop. Is there some sort of APIs for this?
Thanks for your help!
--PerspX
|
|
|
|
|
Perspx wrote: Well i am using straight C/C++ with no classes...
My bad.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi
I have an activex control. In that control I have a bitmap image. Now I have a function called GetImage(), I want to return this bitmap. How do I do that. What should be variable type of GetImage().
Any help would be of great help.
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Zainu wrote: What should be variable type of GetImage().
A pointer to an Image object.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
One way is via the IPicture[^] interface (and related interfaces and APIs).
Steve
|
|
|
|
|
Hello,
Can you please give me the reference for OnCmdMsg() method for CMDIFrameWnd class
Pritha
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/e1zkw1et(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/k63bsef7(VS.80).aspx
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I followed Michael Dunn's article on The Complete Idiot's Guide to Writing Shell Extensions - Part I[^], and created a pair of (two separate) extensions: one for creating file checksums; and a second for verifying. Reference: A File Checksum Shell Menu Extension Dll[^].
It is apparent these are mutually exclusive on Vista (I just retested on Windows 2000 - OK):
* Register both Create and Verify
- Only Create is available
* Register only Verify (unregister Create)
- Verify is available
Any ideas? I pasted part of the Registry Resource (to verify uniqueness of UUIDs). But I suspect it has to do with the way the handler registers. I verifed both are registered under HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers.
Also, I'm not convinced this is a Shell/COM issue, so I moved the question from the ATL board to the VC++ board.
Jeff
The Ctx prefix was added below so that the items would 'stack' (group together) on the Context menu.
HKCR
{
NoRemove CLSID
{
ForceRemove {7E745006-3E3F-42F8-B806-E24D4133439C} = s 'CtxVerifyHash Class'
...
and
HKCR
{
NoRemove CLSID
{
ForceRemove {571077DC-F353-43C8-ACAC-4DE4B7EFC4E3} = s 'CtxCreateHash Class'
...
|
|
|
|
|
Hi All,
A fresh build using Visual Studio 2005 (new project, not a port) did not resolve the issue. Also, the issue is confirmed in XP.
Jeff
|
|
|
|