|
Hi
i seem to be getting an intermitant error
in my application when i send XML posts to our
web service
the error is
Run-time error '-2146697211 (800c0005)'
does ne1 have any ideas ? it only seems to happen
ocassionally
thnkas
si
|
|
|
|
|
I need to create new outlook express button, that do something, can you tell me where to start? I can't imagine where to find informations about this. Tried search engines, groups, but find no information on this topic.
|
|
|
|
|
What do you call a Outlook Express button? The button from a toolbar or what?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Yes, I meen create and add new button to Outlook Express toolbar, that for example opens some other program when pressed.
|
|
|
|
|
I've written a function which is prototyped like this:
void myfunc(char *first, ...)
I'm using the va_arg, va_end, va_start macros to access the variable-argument list but I have to specify a terminator. Is there any way I can avoid having to specify the terminator?
Here is example from MSDN:
int average( int first, ... )
{
int count = 0, sum = 0, i = first;
va_list marker;
va_start( marker, first );
while( i != -1 )
{
sum += i;
count++;
i = va_arg( marker, int);
}
va_end( marker );
return( sum ? (sum / count) : 0 );
}
where the function must be called like this:
printf( "Average is: %d\n", average( 2, 3, 4, -1 ) );
Note the "-1" parameter!
If I have to do this, how does printf() avoid it?
|
|
|
|
|
Anonymous wrote:
If I have to do this, how does printf() avoid it?
The format string given to printf() implicitly says how many parameters should be there. For your average() method, there is no way the method can tell how many parameters are there, so the terminator is required.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Anonymous wrote:
If I have to do this, how does printf() avoid it?
It probably uses vsprintf I
f there is a format specifier. e.g. printf("%d %d", 42, 53) you can easily work out the number of argumenst required, you must make the assumption they are all present though.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Anonymous wrote:
If I have to do this, how does printf() avoid it?
printf() avoids it by not caring. It assumes that you are passing the same number of args as there are option switches in the format string. If you don't, printf() might crash.
So what can you do? There are basically two choices:
- Add a count parameter to your function:
int average( int first, int count, ... )
- Do what the MSDN example does, and supply a terminator value.
p.s. Thank you for taking the effort to format your question.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hi,
I've a .net project and I need to convert it to VC6.0 how do I do it !!
Ciao
- Nilesh
|
|
|
|
|
|
I declared a CFont object and a CIpAddressCtrl object in the header of CWnd -based class
CFont m_Font;
CIpAddressCtrl m_IpAddress;
In the Create method of this class I created font and set it to the CIpAddressCtrl object.
m_Font.CreateFont(...);
m_IpAddress.SetFont(&m_Font);
After destroy my class Numega's BoundsChecker tell me about Invalid Argument: DeleteObject. Why?? If I use other control instead CIpAddressCtrl (tested with CComboBox and CEdit ) then all OK.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
MSDN says: "When you finish with the CFont object created by the CreateFont function, first select the font out of the device context, then delete the CFont object."
You could call m_Font.DeleteObject() in the dtor of the CWnd class.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
In a case with the chosen font in CIpAddressCtrl DeleteObject results to the same error.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi all
i hope that this time i am here with an easy question.
i have a DLL in this DLL i have used WndProc and GetMessage along with Journal Record Hook, in this LL i am generating function code. by function code i mean that the user interactions are saved in the form of functions. lets say that i have a comboBox and a user selects an item from this. i would generate a Combo_Select_item in my DLL and this entry is being wrriten to a simple text file.
now that i am integrating this code in to a driver program which is a an SDI application i want to past this generated code to the workspace of the SDI driver application i mean as the code is generated in the DLL simultaneously it should be pasted in the SDI workspace has any one done this stuff if so please do tell me this time i am badly needing this i u have any furthur queries post it
thanx in advance for ur time
regards
Basim
|
|
|
|
|
Hi All,
i have an application which opens a web browser. I want to open all the new window events to cause open the same URL in parent window so that no new window is open, and the contents are also displayed. I can trace and stop the user from opening new window but..that causes..no new window and no contents of the URL displayed so I m stuck there..whilst i want user should browse and get the contents but he cannot open new window............Please help...
Any help or pointers are highly appreciated....Thanks a lot in advance..
Himanshu
|
|
|
|
|
NetWkstaUserGetInfo shows you the current user logged in the workstation. Maybe you need to update your SDK.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Thanks for your answer, but i am using SDK Feb. 2003. The SDK documentation says, that...
The NetWkstaUserGetInfo function returns information about the currently logged-on user. This function must be called in the context of the logged-on user.
I tried to use this function in a differnt user context...
|
|
|
|
|
I am sorry, I wasn't very sure about your question. I really cannot be of much help but have a look at NetWkstaUserEnum. I have never used this function but I just came across it.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Hi,guys
i have got a big problem getting the currently logged on user (WinSta0\Default). There are some functions like GetUserName(Ex) and NetWkstaUserGetInfo, but they show only the user of the current process. My problem is, that i am using a service running under local Admin and want to know who or if somebody is logged on.
Thank you very much
Dirk
|
|
|
|
|
Hi
Can anybody tell me where can i download msdn 2003. I remember reading a post on this but could not find it.
Thanx
|
|
|
|
|
http://download.microsoft.com/download/b/d/c/bdccea1b-96d9-4ad9-8045-56619af95835/qtr40enud1.img
http://download.microsoft.com/download/b/d/c/bdccea1b-96d9-4ad9-8045-56619af95835/qtr40enud2.img
http://download.microsoft.com/download/b/d/c/bdccea1b-96d9-4ad9-8045-56619af95835/qtr40enud3.img
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
thanx
|
|
|
|
|
You're welcome.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Great, maybe I should download them also
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
how do i make one behave as a checkbox without adding a checkbox control?
|
|
|
|