|
Thnx for (late) reply but ive done it and through the same method as u told.
Since Im stuck in cryptography stuff nad Im using CryptoAPI Ive some data of type BYTE* (PUBLICKEYBLOB)I want to write it in a file then send it across the network and then read from file and use that public key.SIGH!!!!
now to write it in the file i covert BYTE* to CHAR* and then inverse to read ...but to dont get the same value back.
Do u have any better idea to do this??
Thanx again for ur help.
|
|
|
|
|
How to create multiple toolbars?]
Thanks
|
|
|
|
|
when I am setting any type of hooks within a DLL and I want to print any information in a file from that DLL (for example at what time a WM_xxx message was sent or things like that) my hook callback freezez it just doesn't respond. I am using fopen,fprintf,fclose functions. I know this is the problem because when I use a messagebox for example instead of writting in a file it works fine.
Can someone tell what is the problem. This used to work
Sorry for my english
gabby
|
|
|
|
|
Hi!
I'm just starting COM,and have to submit a project this semester... advanced networking and COM. we are a team of four... Can anyone suggest a good topic for the project... one such that i can show it on my resume... thanks!
|
|
|
|
|
They should of taught you about COM, before teaching you about networking.
(They are totally different subjects)
1) Don't think about the COM part (too much).
2) Write code that can send via the network, as well as receive.
3) Then write a COM wrapper around your code.
The term network does not matter, it is just a place holder, which applies to networking in general.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
hi!
thanks for the advice, but i know about networking..in fact we had developed a FTP client and server earlier this year.. what i wanted was to develop something new.. there are so many networking projects right?
|
|
|
|
|
hiho@ll
i have a prog (already compiled (.exe) and i don't have the source)
i want this prog, which only runs as single instance, to have it run more instances
is this possible?
if yes, how?
i had 2 ideas
both i don't know how to do:
1. change the prog itself, that it can run more instances (well, how?)
2. change some OS settings, if the prog already runs, so that if the program checks if there is already a running instance, the windows tells the prog "no you'r alone" (how?)
thx@ll
|
|
|
|
|
ThinkingPrometheus wrote:
is this possible?
unfortunately yes.
BUTT,
Most people who want to stop multiple instances (of their program), have a good reason for doing so.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
i know there is a reason
but not everytime! sometimes there are progs, which have this feature just to have it
do you know how it works? if yes, how?
thx
|
|
|
|
|
Without the source code I would not do it, because it requires reverse engineering at least part of its binaray code (which is normaly illegal).
In Windows (code wise):
1) Win16: You just needs to check the hPrevInstance handle.
2) Win32: You call CreateMutex() and then call GetLastError().
In both cases, you need to find where the check is ocurring, in the binary, and change the result.
So yes I know how it works and no I can not tell you how to do it.
Signed: John R. Shaw
P.S. Some thing is wrong with CP cookies again, it realy is me.
|
|
|
|
|
ok
i thought it would work something like:
get application handle, use some functions, ...
because i thought you can nearly change everything if you have the application handle
didn't really thought about reverse engineering cause i don't know how it works
another question: not really about this topic, but it seems you know reverse engineering
i was asking myself if it's possible to encrypt an exe
i mean, wouldn't it be impossible to reverse engineer a application if the executing file is encrypted?
i know it's also a performance question, but if i don't want my app to be reverse engineered, is't it possible to make it impossible
regards
|
|
|
|
|
I want to write an application to list down all the websites visited similar to the history folder.
How do i do it?
Is there any way that i can block the sites i wish to block?
|
|
|
|
|
It is said that "Once a reference is initialized to an object, it cannot be
changed to refer to another object."
But does this only apply locally. The following codes can compile successfully inside function which is controdict with the rule
int x;
int y;
int& r = x;
r = y;
-----------
Another question
extern class A;
void h(A*& a)
{
...
}
int main() {
A a;
h(&a);
A *b = New A;
h(b)
Why line 2 can't pass the compilation? I see no difference between "&a" and "b"
|
|
|
|
|
There's no contradiction.
Check this modified code
int x = 10;<br />
int y = 20;<br />
int& r = x;
r = y;
r += 10;
cout << r << " " << x << " " << y ;
For the second one, you have created reference to a pointer in the function parameter A*& a . By this it means a refers to a pointer of type A which it can modify. However when you pass &a to the function h , &a is not modifiable.
Check this sample code
A a1, a2;<br />
A* p1;<br />
A* &r1 = p1;
p1 = &a1;
r1 = &a2;
<br />
A* &r2 = &a2;
|
|
|
|
|
I see your point.
int x = 3;
int y = 1;
int& r = x;
r = y;
int main() {}
The above codes can't pass the compilation and with a error message "'r' : missing storage-class or type specifiers", It doesn't make sense to me, here the last line just assign "y" to the object "r" refers which is "x", and when I move it to local function the error disappears, why?
|
|
|
|
|
YongSheng Li wrote:
int x = 3;
int y = 1;
int& r = x;
r = y;
int main() {}
The first three lines are variable declarations that include their initialization. That's valid at the file scope.
The fourth line (r = y; ) is an assignment, which is not legal at the file scope; it's only valid in the body of a function.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
|
|
S. Senthil Kumar wrote:
Beat me to it by a minute
What that supposed to means?
|
|
|
|
|
You can only declare and initialize variables outside of functions, you can't write statements like r=y .
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello to all members
In a project which is in mfc some data is shown on a
window is there anyway to show some background image
Ankit Aneja
|
|
|
|
|
Ankit Aneja wrote:
window is there anyway to show some background image
Handle WM_PAINT and then draw image on the BackGround of Window!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
i am showing my data in Listcontrol and want to show image on background
of that listctrl behind my data
i found CListCtrl::GetBkImage
and example
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
LVBKIMAGE bki;
// If no background image is set for the list view control use
// the Microsoft homepage image as the background image.
if (pmyListCtrl->GetBkImage(&bki) && (bki.ulFlags == LVBKIF_SOURCE_NONE))
{
pmyListCtrl->SetBkImage(
TEXT("http://www.microsoft.com/library/images/gifs/homepage/microsoft.gif"),
TRUE);
}
but not undestanding how to use this
also tried like this
void CXListCtrl:: SetBkImage( LVBKIMAGE* plvbkImage )
{
SetBkImage(
TEXT("http://www.microsoft.com/library/images/gifs/homepage/microsoft.gif"),
TRUE);
}
Ankit Aneja
|
|
|
|
|
Hi,
it seems that you try to set a gif background image.
I think the only thing that can be shown is a HBITMAP or a CBitmap.
To load a bmp file, you can use following code:
CBitmap* LoadBitmap(const CString& Path)
{
CBitmap* attempt = new CBitmap;
HBITMAP hbmp = (HBITMAP)LoadImage(0, Path, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
if (hbmp && attempt->Attach(hbmp))
{
return attempt;
}
delete attempt;
return 0;
}
Regards
|
|
|
|
|
Thanks
in OnInitDialog() where i am inserting coloumns
i write the following code
// Insert Background Image into the ListControl
LVBKIMAGE bki;
if (m_ctrlListNews.GetBkImage(&bki) && (bki.ulFlags ==LVBKIF_SOURCE_NONE))
{
m_ctrlListNews.SetBkImage(TEXT("C:\\close.bmp"),TRUE);
// Use your own Image Address Here
}
and it works but image is not transparent
means it cuts for lines and columns where some data is
filled
is there any way to make the image transparent so that it can be seen behind
the text shown in list control
Ankit Aneja
|
|
|
|