ASCII Table different?

Posted By: Espér

ASCII Table different? - 06/23/11 10:09

Hi there..

My Team and i are coding a en-/decryption system for our Updater..
But we are unsure with the ASCII table..

A8 seems to start with 32 (space).. a normal table starts with 0 (NULL)...

Has A8 the complete table (0-255), and just shows 32 - 127.. or just the 32-127?
Posted By: WretchedSid

Re: ASCII Table different? - 06/23/11 10:14

A char has always 8 byte in Lite-C and is always unsigned, so you have the full range of 0-255. Whats displayed on eg. TEXT elements has nothing to do with this but only with a) the used font and b) how the glyphing system of Gamestudio works.

Anyway, if you still use the same encryption like in the last thread: Please, throw it away together with the coder who proposed it as secure! Its not secure, its easily breakable in a few _SECONDS_!
Posted By: Espér

Re: ASCII Table different? - 06/23/11 10:36

the problem is.. i´ve no clue on how to add libs to lite-c.. or how to use cryption dlls..

So.. we try it with a code to change letters, recalculate the ascii char and change them again..

if you´ve a good beginner manual for using libs/dlls with lite-.c.. i´ve an open ear for it.
Posted By: Stromausfall

Re: ASCII Table different? - 06/23/11 10:50

>>if you´ve a good beginner manual for using libs/dlls with lite-.c

Online Manual >> Gamestudio SDK >> Plugin SDK
Posted By: Espér

Re: ASCII Table different? - 06/23/11 11:06

yes.. i know that.. but didn´t understand any word ._.
Posted By: Stromausfall

Re: ASCII Table different? - 06/23/11 11:29

how about the excellent one from the wiki ? (it explains step by step how to create a dll)

http://www.opserver.de/wiki/index.php/Writing_a_basic_DLL
Posted By: Espér

Re: ASCII Table different? - 06/23/11 11:33

i don´t want to create a dll.. i just want to USE it.. ._.
It would make no sense to create a dll with the same en-/decryption code as in lite-c..
so..
When i want to use a premade cryption library.. how to include it into my game, and how to make use of it´s functions?
Posted By: Stromausfall

Re: ASCII Table different? - 06/23/11 12:04

afaik (I'm really not sure about that), you have to create a plugin .dll that wraps the functions, then you can call the wrapped functions in lite-c
Posted By: WretchedSid

Re: ASCII Table different? - 06/23/11 12:14

No, you can also use the WinAPI to get the exported symbols and then call them:

Code:
long dllHandle = LoadLibrary("myAwesomeDll.dll");
someFunctionPrototypeWithMatchingSignature = GetProcAddress(dllHandle, "exportedFunction");


Posted By: DJBMASTER

Re: ASCII Table different? - 06/24/11 11:43

The 3rd-party encryption DLL should come with a header file surely? You include that and then call the functions?
Posted By: WretchedSid

Re: ASCII Table different? - 06/24/11 12:28

Which will crash because the exe isn't linked with the binary at compile time.
Posted By: DJBMASTER

Re: ASCII Table different? - 06/24/11 14:35

Oh wait, He wants to combine un-compiled code into an already compiled program? Yeah thats just looking for trouble.

I thought he just wants to use a dll in his source, hence including the header file.
Posted By: WretchedSid

Re: ASCII Table different? - 06/24/11 14:45

You understood it quite right, but from just including the header file the dll won't be linked automatically with his exe. Neither at compile time, nor at runtime.
Posted By: DJBMASTER

Re: ASCII Table different? - 06/24/11 15:15

Maybe I'm missing something laugh

If you want to use an external dll in your program, you include the header file that accompanies it, compile it with the header file and then you can access the functions inside the dll.

I don't know, I don't use C/C++ very often laugh Please enlighten me laugh
Posted By: WretchedSid

Re: ASCII Table different? - 06/24/11 15:58

I'm beginning to feel stupid it now, but let me repeat it again:
Quote:
just including the header file the dll won't be linked automatically with his exe. Neither at compile time, nor at runtime.

Posted By: Quad

Re: ASCII Table different? - 06/24/11 20:44

yeah, but engine opens the DLLs that use the plugin SDK automatically at startup, this is unrelated to including a header. As long as you define a prototype and call a function with same name and a matching signature that also exists in the DLL , it will use the function from the DLL.
Posted By: WretchedSid

Re: ASCII Table different? - 06/24/11 21:22

Problem is: Esper already said he has no clue how to work with the plugin SDK and I doubt that there is any cryptographic library compiled against the Gamestudio SDK. So no automatic linking, just including the header and calling functions will fail.
Posted By: Quad

Re: ASCII Table different? - 06/24/11 21:51

Of course they will. There is still API macro but idk how much of help that will be for esper.
© 2024 lite-C Forums