This is a very simple "green script" DLL, but has some cool features such as: -> Compiling -> Decompiling -> Saving / Loading (CODE + COMPILED) -> Running -> Debug Mode (basic) The DLL exports these symbols: int ReleaseID(int a); // release a script id int AllocateID(void); // get a script id bool UseID(int i); // select script id float GetReturnValue(void); // get return value bool BeginWrite(void); // start writing to code buffer bool EndWrite(void); // stop writing to code buffer bool WriteCode(char *string); // compile line of source code bool WriteByte(char data); // write data into buffer (caution!) bool WriteData(char *data, long bytes); // write data into buffer (!!) bool WriteString(char *string); // never use! bool WriteValue(float value); // ditto bool BeginRead(void); // reset read position bool EndRead(void); // ends read time (no effect generally) int Run(void); // run buffer from current int Restart(void); // run buffer from start bool DebugSwitch(bool switcher); // set debug mode bool SaveCompiled(char *filename); // save COMPILED code bool LoadCompiled(char *filename); // load COMPILED code bool SaveCode(char *filename); // save CODE (decompiles) bool LoadCode(char *filename); // load CODE bool Validate(void); // validate buffer bool ReadCode(char *buffer); // get current opcode text bool NextOpcode(void); // advance to next Special Exports: long GreenProjectEntry(long expectedproject, long expectedversion); char *GreenProjectInfo(long infonumber, float security); Example code: int main() { // // ASSUME: // // * dll dynamically loaded // * exports imported with same function names // * you are a good coder! // // initialise library (41200,1 are project, version) GreenProjectEntry(41200, 1); // ready to go! int demo; demo = AllocateID(); if (demo < 0) { printf("error allocating id\n"); return -1; } if (UseID(demo) < 0) { printf("error using id\n"); return -1; } // load a compiled file if (LoadCompiled("example.yc") < 0) printf("error loadcompiled"); // decompile it (fun) if (SaveCode("example.y") < 0) printf("error savecode"); // run it (run() return vals. are same) switch (Restart()) { case 1: printf("finished naturally"); case 2: printf("finished ok"); case 3: printf("finished with retval"); case -3: printf("debug break"); case -4: printf("debug mark (debug mode only)"); default: printf("some error"); } // etc... if (ReleaseID(demo) < 0) { printf("error deallocating id\n"); return -1; } return 1; }