LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

inline asm in CVI - integration with Execryptor

Hi all,
I'm trying to "prepare" my application for being processed by ExeCryptor (an utility that parse the exe file and encrypt some portion of code, properly marked).
Basically this utility requires that in some portion of your code you have to put special markers (made up of a fixed sequence of byte).
The suggested method for putting the special markers is to define a macro like this:

#define CRYPT_START { asm {                           \
    DB 0EBh, 006h, 0EBh, 0FCh, 0EBh, 0FCh, 0FFh, 0F8h \
  }; {


and to put the CRYPT_START where you want to start encryption.
I've read in the forum that CVI doesn't support asm. Is it correct even in the latest CVI release?
Does anyone know a workaround in c to hardcode a sequence of byte at a certain point of your code?

many thanks in advance
cheers
0 Kudos
Message 1 of 3
(4,260 Views)

Hi Davide,

I've found these few lines about your problem and I think that for now there is now integration:

CVI does not support __inline and __asm modifers and keywords, since CVI is not an optimizing compiler and cannot compile assembly code, respectively. Unfortunately, there are no workarounds to that, since CVI is not designed to handle these operations.

If it doesn't change the behavior of the third party API, you can ignore __inline modifiers using "#define __inline" and ignore __asm keywords and the assembly code using #define and some regular expression tricks. However, ignoring the assembly code will most definetely change the behavior of the code.

Best regards,

 

Marco

0 Kudos
Message 2 of 3
(4,230 Views)
I may be way out to lunch here, but what if one were to use an external compiler, now supported by CVI? (Under Options>>Build Options).
0 Kudos
Message 3 of 3
(4,218 Views)