int main(array ^args) { //PERL_SYS_INIT3(0,'ss','dd'); my_perl = perl_alloc(); perl_construct(my_perl); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // Create the main window and run it Application::Run(gcnew Form1()); // perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); return 0; } #### First-chance exception at 0x7c84cd02 in perl_form.exe: 0xC0000005: Access violation writing location 0x00000014. A first chance exception of type 'System.AccessViolationException' occurred in perl_form.exe An unhandled exception of type 'System.AccessViolationException' occurred in perl_form.exe Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. #### int main(array ^args) { PERL_SYS_INIT3((int *)NULL,(char ***)NULL,(char ***)NULL); my_perl = perl_alloc(); perl_construct(my_perl); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // Create the main window and run it Application::Run(gcnew Form1()); perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); return 0; }