|
Actually, one should write l1 = (char*)malloc (10 * sizeof (char));
Best regards,
Alexandru Savescu
|
|
|
|
|
How can I use an ActiveX in My Activex control?
|
|
|
|
|
Please be more Clear.
I didnt understand ur question
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Can gdi+ draw a line with 3d looks like?
And how?
Any suggestion?
Thanks!!
i am realfly8)
|
|
|
|
|
Be a bit more precise, what do you mean by:
realfly wrote:
with 3d looks like?
Normski. - the next bit of code is self modifying ... jmp 0xCODE
|
|
|
|
|
I mean such as a metal thead.
What I do now is get a bmp which to be the TextureBrush.
It works find when I draw a horizontal line. but when that's not the horizontal one. It looks bad.
What should i do?
i am realfly8)
|
|
|
|
|
Sure - you can draw whatever you like. Just draw with some perspective.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
How can I change a border width for frame?
|
|
|
|
|
Well, im trying to write this RC4 encryption class... but its not working properly.... And I cant find the bug.... Can you?
class CEncrypt
{
int m_sBox[256];
public:
CEncrypt() {}
~CEncrypt() {}
void SetKey(char *sKey, int iKeyLen)
{
int i, j = 0, k;
for (i = 0; i < 256; i++)
m_sBox[i] = i;
for (i = 0; i < 256; i++) {
j = (j + m_sBox[i] + sKey[i % iKeyLen]) % 256;
k = m_sBox[i];
m_sBox[i] = m_sBox[j];
m_sBox[j] = k;
}
}
void Encrypt(char *sBuffer, int iBufferLen)
{
int sBox[256], iOffset, i = 0, j = 0, k;
memcpy(sBox, m_sBox, sizeof(m_sBox));
for (iOffset = 0; iOffset < iBufferLen; iOffset++) {
i = (i + 1) % 256;
j = (j + sBox[i]) % 256;
k = sBox[i];
sBox[i] = sBox[j];
sBox[j] = k;
sBuffer[iOffset] = sBuffer[iOffset] ^ (sBox[(sBox[i] + sBox[j]) % 256]);
}
}
};
|
|
|
|
|
Not without descriptions of what the code is supposed to do, and what it actually ends up doing.
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Try to compare your source with some from here:
ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/rc4
|
|
|
|
|
Well, im trying to write this RC4 encryption class... but its not working properly.... And I cant find the bug.... Can you?
class CEncrypt
{
int m_sBox[256];
public:
CEncrypt() {}
~CEncrypt() {}
void SetKey(char *sKey, int iKeyLen)
{
int i, j = 0, k;
for (i = 0; i < 256; i++)
m_sBox[i] = i;
for (i = 0; i < 256; i++) {
j = (j + m_sBox[i] + sKey[i % iKeyLen]) % 256;
k = m_sBox[i];
m_sBox[i] = m_sBox[j];
m_sBox[j] = k;
}
}
void Encrypt(char *sBuffer, int iBufferLen)
{
int sBox[256], iOffset, i = 0, j = 0, k;
memcpy(sBox, m_sBox, sizeof(m_sBox));
for (iOffset = 0; iOffset < iBufferLen; iOffset++) {
i = (i + 1) % 256;
j = (j + sBox[i]) % 256;
k = sBox[i];
sBox[i] = sBox[j];
sBox[j] = k;
sBuffer[iOffset] = sBuffer[iOffset] ^ (sBox[(sBox[i] + sBox[j]) % 256]);
}
}
};
|
|
|
|
|
Does eMbedded Visual C++ 4.0 support ATL-OLEDB Consumer classes e.g., CCommand, CAccessor etc. Need to port a component that extensively uses these classes to Windows CE .NET platform?
Thanks in advance
|
|
|
|
|
How do you get the path/names of special folders on a computer? Like "desktop", "temp", "favorite" etc? I tried to look them in MSDN but only found ::GetSystemDirectory. Thanks.
|
|
|
|
|
SHGetSpecialFolderLocation() or SHGetSpecialFolderPath()
CPUA 0x5041
Sonork 100.11743 Chicken Little
My pet, My pet stick
Nicer than a twig
Cooler than a rock.
(Microsoft ad)
Within you lies the power for good - Use it!
|
|
|
|
|
how can i group my command buttons and perform the same function
|
|
|
|
|
How to distinguish from MO,Zip and Card reader except find out there lable. Because there are the removeable device,I have trouble of them.
Could you help me?
Thanks a lot.
mail:cshung@email.geniusnet.com.tw
|
|
|
|
|
Hi!Everybody.
The normal tree are just like this:
root
+sub1
+sub2
+subsub1
Do anybody known about a tree which is right to left construct?
like below:
root
sub2+
sub1+
subsub1+
a strange question8)
Thanks in advance!
i am realfly8)
|
|
|
|
|
This it?
<br />
TVS_RTLREADING <br />
Version 4.70. Causes text to be displayed from right-to-left (RTL). Usually, windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read RTL. Typically, tree-view text is displayed in the same direction as the text in its parent window. If TVS_RTLREADING is set, tree-view text reads in the opposite direction from the text in the parent window. <br />
Just a suggestion (if you haven't already tried. Just go into Visual Studio help and search for the object (in this example CTreeControl)
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Thanks for your reply.
That's not what i want.
sorry for my ambiguous figure. what i mean is a reverse tree. just like a mirror of a tree like below:
root root
+sub sub+
+sub sub+
i am realfly8)
|
|
|
|
|
I can't seem to find anything else so you will probably need to subclass CTreeCtrl and draw it to your specifications. Sorry I couldn't be of more help.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Thanks for all reply, I found an vcl component for delphi and c++ builder.
Can I use it in visual c++? and how ?
i am realfly8)
|
|
|
|
|
If you have delphi or c++ builder maybe but I don't really know. Sorry.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Hello guys,
I would like to create a program that can compare lots of files in different folders and find the identical files. If I compare it byte by byte for each file it's going to take a lot of time. Do you have any good idea?
Regards,
Hiu Sing Ngai
http://www.firegraphic.com
|
|
|
|
|
you could generate a hash value for each file using a cryptographic hash function. then, just compare the hash values. it will always find matches, though it has a possibility of also finding false positives (in case two different files work out to identical hashes), but the odds are low.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|