S
Sueffel
Okay, I'm new to VC++, but have used VB6 for a while, and have moved to
VB.NET, but, have to devulge into C because of a couple of things:
First and foremost, Function Exporting. Then, ofcourse, the fact that no
matter how much obfuscation you do to a .NET assembly, you can get the code
with a little work. Then there's speed ofcourse.
Okay, here's where I'm at. I have my DLL made, learned how to export my
function, learned about vectors, and made a test function as follows:
__declspec(dllexport) int EatMe(int Input[])
{
vector <int> vi( 10, 5);
vi[2] = Input[2];
return vi[2];
}
Not too shabby I'd say. Now, what I need to do is this:
First, I need to pass this a string, sorry, still in VB mode, a char array.
I'm going make it's upper limit 255, but can this be done as a vector? Now
comes the fun part, I need to take that char array, convert each charactor
to it's ASCII value, then return the 3 digit code, so I need it to also be
char data type. Confusing? Yes, lemme break it down further. If I send it
the string "Hello", I need to convert it to it's ASCII equiv as such:
[0] 072
[1] 101
[2] 108
[3] 108
[4] 111
And return it. I cannot find anything on returning charactor arrays, and,
since I don't know how big the incoming stuff is, I need to use a vector,
then return the data. I have scoured for a lil while and found nothing.
Help???
Thanks,
Sueffel
VB.NET, but, have to devulge into C because of a couple of things:
First and foremost, Function Exporting. Then, ofcourse, the fact that no
matter how much obfuscation you do to a .NET assembly, you can get the code
with a little work. Then there's speed ofcourse.
Okay, here's where I'm at. I have my DLL made, learned how to export my
function, learned about vectors, and made a test function as follows:
__declspec(dllexport) int EatMe(int Input[])
{
vector <int> vi( 10, 5);
vi[2] = Input[2];
return vi[2];
}
Not too shabby I'd say. Now, what I need to do is this:
First, I need to pass this a string, sorry, still in VB mode, a char array.
I'm going make it's upper limit 255, but can this be done as a vector? Now
comes the fun part, I need to take that char array, convert each charactor
to it's ASCII value, then return the 3 digit code, so I need it to also be
char data type. Confusing? Yes, lemme break it down further. If I send it
the string "Hello", I need to convert it to it's ASCII equiv as such:
[0] 072
[1] 101
[2] 108
[3] 108
[4] 111
And return it. I cannot find anything on returning charactor arrays, and,
since I don't know how big the incoming stuff is, I need to use a vector,
then return the data. I have scoured for a lil while and found nothing.
Help???
Thanks,
Sueffel