|
It's nothing obscure or old. View this:
http://www.mozilla.org/projects/xpcom/book/cxc/html/quicktour2.html#1003424
or this
http://www.iosart.com/firefox/xpcom/
|
|
|
|
|
Fine but you seem to have answered your own question. The instructions for constructing an XPCOM Dll in MSVC++ are here[^] on the page you posted a link to. What is it that you can't do?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I did that project too and succeeded after 2 days to build it without errors and when testing the component on firefox it gives a bunch of errors
That's why I SAID that I need the help of someone who DID THIS BEFORE !!!
Thanks
|
|
|
|
|
That's fine, no need to shout, there clearly aren't a lot of XPCOM guru's here so I suggest you either post the specific errors and ask a specific question (It all looks like pretty standard C++ stuff so you might get some help) or look for a dedicated XPCOM developer community elsewhere. If there isn't one out there then my original comment about obscurity stands.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
cuesdean florin wrote: That's why I SAID that I need the help of someone who DID THIS BEFORE !!!
Just so you know, I voted you a one because you're RETARDED.
|
|
|
|
|
You should have posted the error codes / descriptions ...
Maxwell Chen
|
|
|
|
|
Hi all,
Look at the following lines.
char *tempBuff[1024];
unsigned int iReq;
I want to copy the tempBuff to another buffer, adding the iReq to in-front of the tempBuff. How it is possible.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Are you sure your buffer should contain 1024 char pointers?
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.
[my articles]
|
|
|
|
|
Sorry it should be char tempBuff[1024]
I appreciate your help all the time...
Eranga
|
|
|
|
|
char tempBuff[1024];
unsigned int iReq;
char newBuff[1024 + sizeof(iReq)];
memcpy(newBuff, &iReq, sizeof(iReq));
memcpy(newBuff + sizeof(iReq), tempBuff, 1024);
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.
[my articles]
|
|
|
|
|
TO CPallini:
Then how to read the first four bytes out to form the int value?
<br />
char tempBuff[1024];<br />
unsigned int iReq;
char newBuff[1024 + sizeof(iReq)];<br />
memcpy(newBuff, &iReq, sizeof(iReq));<br />
memcpy(newBuff + sizeof(iReq), tempBuff, 1024);
Can this achieve?
<br />
int *iptr = &newBuff[0];<br />
int iTReq = *iptr;
|
|
|
|
|
fantasy1215 wrote: Can this achieve?
int *iptr = &newBuff[0];
int iTReq = *iptr;
Yes.
Maxwell Chen
|
|
|
|
|
The code is correct, provided you cast the pointer, i.e.
int *iptr = (int*) (&newBuff[0]);
int iTReq = *iptr;
you can also do directly
int iTReq = *((int*)(&newBuff[0]);
or
int iTReq = *((int*)newBuff);
Cheers
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.
[my articles]
|
|
|
|
|
Hello friends,
I want to delete shortcuts that is .lnk files from a particular folder.
some buddy please suggest & give some Sample code for this.
Thanks in advance...
|
|
|
|
|
|
You can delete them just like you would any other file. What extension the file has is unimportant.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
In my system not installed languagepack.when i paste chinese characters in rtf ..
In sending i wrote this code...
here m_chattext is rtf object.
m_chattext.GetWindowText(m_Text);
AfxMessageBox(m_Text);
in messagebox the chinese characters are not displaying..its coming ???? how i can solve this problem ...plz tell...
#sanroop#
|
|
|
|
|
do you have compiled your project as unicode ?
if not, make sure that you use
preprocessor definitions ( c++ page )
_UNICODE
output (link page) - entry point symbol
wWinMainCRTStartup
further on you could use _T("") instead "" in your code
hope it helps
|
|
|
|
|
no sir its not coming....
#sanroop#
|
|
|
|
|
i think you are correct
perhaps you could use CEdit instead but if not keep in mind
RichEditCtrl in Visual C++ 7.0 supports Unicode. To obtain Unicode strings from the RichEditCtrl box, use EM_GETTEXTEX message instead of GetDlgItemText.
SendMessage(
EM_GETTEXTEX,
(LPARAM) &getTextEx, // GETTEXTEX structure
(WPARAM) lpszWChar // output WCHAR array
);
see also:
http://easai.00freehost.com/unicode.html[^]
|
|
|
|
|
Hi friends,
I am trying to allocate around 3 sets of nearly 1.8MB of memory with calloc inside OnInitDialog() function of MFC. I used a memory leak detector tool and before I could start the worker threads I was able to see memory leaks in the lines which I used to allocate the memory mentioned above. Is there any issue in using calloc for memory allocation more than 64KB. I am using Win2000 with Visual studio 6.0 (VC++).
Following is the code snippet I used.
char *source_buf;
unsigned long size = 9001;
source_buf = (char*) calloc((size*200),sizeof(char));
|
|
|
|
|
Does your application check calloc return value?
Does it free allocated memory?
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.
[my articles]
|
|
|
|
|
I am not checking calloc value. But in debug mode I have watched the pointers. They are valid ones. At the same time I would like to mention that I am not freeing them anywhere in the code because this buffer is used cyclically throughout the runtime of the code by the worker thread. The pointer is duplicated for use by the worker thread.
char *store_buf;
store_buf=source_buf;
|
|
|
|
|
Since you are using MFC, why are you avoiding the new operator?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am a bit curious about why to use new in MFC. What is the danger which is avoided by using 'new' and why such a precaution in MFC. I am almost unaware about MFC and its fundamentals.. That's why I am curious about the above issue
|
|
|
|