|
when myActiveX has been registered, it will be debug and execute without any problem.
this error occurs through a manifest.
and mfc90ud.dll is in C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugMFC_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_2a62a75b
Zo.Naderi-Iran
|
|
|
|
|
zon_cpp wrote: this error occurs through a manifest.
Check your manifest file, or post it here. I have seen similar issues in the past when the contents of my manifest file was not correct.
|
|
|
|
|
i have to pass xml as string to dll
|
|
|
|
|
XMl is a format, it is not a data type. So, you can't "convert" from xml to string. If you have xml file, just read its content into a string and pass the string to your dll.
|
|
|
|
|
ya same thing i asked
i have no idea on how to read in a string
|
|
|
|
|
mailgirish99@yahoo.com wrote: i have no idea on how to read in a string
Are you serious? This is one of the most basic functions of programming. Try reading some of the MSDN pages on file handling, strings etc.
|
|
|
|
|
XML is basically a text file; so, use the CStdIOFile class to read the XML file and put that in a string.
me think it's kind of weird to pass a whole XML file as text to another function; but heck if that what is needed, so be it.
Are you certain you are not asked to pass the pathname/filename pointing to the XML file ?
This signature was proudly tested on animals.
|
|
|
|
|
hello every one
I am a beginner in c language
I am trying to print factorial of number using the program given below......
#include<stdio.h>
void main()
{
int fact=1,counter=5;
clrscr();
while(counter>0)
{
fact = fact * counter;
counter--;
}
printf("fact of %d is: %d",counter,fact);
getch();
}
I need output as
<b>Fact of 5 is 120.</b>
|
|
|
|
|
The program seems fine.
What is the error you are getting?
|
|
|
|
|
chaudhari.hemant1 wrote: printf("fact of %d is: %d",counter,fact);
You are trying to print the value of counter as 5, but you have decremented it in your loop so its value now is zero.
|
|
|
|
|
void main()
{
clrscr();
int fact=1, counter=5;
int term = 1;
while(term <= counter)
{
fact = fact * term;
term++;
}
printf("fact of %d is: %d", counter, fact);
getch();
}
modified on Saturday, December 12, 2009 4:55 AM
|
|
|
|
|
And just how does this loop end?
while(counter <= counter)
Perhaps you meant
while(term <= counter)
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
yes. sorry.
the code has been edited.
|
|
|
|
|
#include < stdio.h >
void main()
{
int counter,fact=1,num=5;
counter = num;
clrscr();
while(counter > 0)
{
fact = fact * counter;
counter--;
}
printf("fact of %d is: %d",num,fact);
getch();
}
|
|
|
|
|
dear brother, can you tell me how to hook the messages of a short-cut menu?
for example, the short-cut menu on the desktop
|
|
|
|
|
Menu commands are sent using WM_COMMAND .
You should be able to intercept them using SetWindowsHookEx with WH_CALLWNDPROC .
|
|
|
|
|
i can see one message WM_ENTERMENULOOP that sends to menu, but i don't see any messages of mouse sent to menu, how can i hook these message
|
|
|
|
|
sunen wrote: for example, the short-cut menu on the desktop
What exactly do you mean by this, the start menu or the context menu (right-click)?
|
|
|
|
|
aha, what i want is the context menu, thank you
|
|
|
|
|
sunen wrote: what i want is the context menu
In that case I think you may have to hook the WM_CONTEXTMENU message. See the MSDN docuentation for more details.
|
|
|
|
|
i have seen the msdn, but i still have no idea to implement it , can you give me some tips, thank you very much
|
|
|
|
|
maybe i need clear what i exactly want?
the scene:
i have right-clicked on the desktop,
so i receive the WM_CONTEXTMENU message and get one short-cut menu,
now i am operating mouse and produce some message,
for example, WM_MOUSEMOVE, WM_LBUTTONDOWN, and so on,
the key point is how can i hook these message?
|
|
|
|
|
You need to use the SetWindowsHookEx()[^] function to monitor the messages going through the system, then activate whatever you need when you see the message that you are interested in. The following CodeProject Article[^] explains how you can utilise this feature.
|
|
|
|
|
Hello,
I am trying to create a trim function for char pointer. The lTrim can work perfectly. But, run time error occurs at rTrim.
Below is the error msg :
"Unhandled exception at 0x00411b37 in Test2.exe: 0xC0000005: Access violation writing location 0x00418cf7."
Full code provided below :
<code>
#include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
int isspace ( char c );
char * lTrim ( char * p );
char * rTrim ( char * p );
char * Trim( char * p );
int isspace ( char c )
{
return c == ' ' || c == '\t' ||
c == '\v' || c == '\f' ;
}
char * lTrim ( char * p )
{
while ( p && isspace(*p) ) ++p ;
return p ;
}
char * rTrim ( char * p )
{
char * temp = 0;
if (!p) return p;
temp = (char *)(p + strlen(p)-1);
while ( (temp>=p) && isspace(*temp) ) --temp;
*(temp+1) = '\0';
return p;
}
char * Trim( char * p )
{
return lTrim(rTrim(p));
}
int main()
{
char * str = " This is utterly brilliant ";
printf(">>%s<<\n", str);
str = Trim(str);
printf(">>%s<<\n", str);
getch();
return 0;
}
</code>
Your guidance on solving this problem is very much appreciated.
Thanks,
Goutam
|
|
|
|
|
Try changing char* str in the main function to char str[]
|
|
|
|