Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to use MAXSDK function ExecuteMAXScriptScript to exec script in my application. but I create an VS2008 project and use this function, the application crash with error
Unhandled exception at 0x774a8da9 in Test.exe: 0xC0000005: Access violation writing location 0x00000014.
The project can be complied,why it can't run correctlly?I have use the maxscrpt.lib and maxscrpt.dll in the working directory.
Posted
Comments
Ron Beyer 20-Dec-13 22:09pm    
Just because it can be compiled, doesn't mean it works. Can you post the offending code?
CmMac 20-Dec-13 22:10pm    
The code is very simple.Is anywhere has problem?
#include "stdafx.h"
#include <maxscrpt maxscrpt.h="">

#pragma comment(lib, "maxscrpt")
#pragma comment(lib, "core")

int _tmain(int argc, _TCHAR* argv[])
{
//Test t;
//t.show();
//DisableThreadLibraryCalls(hInstance);
//MaxUtils::execScript("lsjfd");
::ExecuteMAXScriptScript("lskjfd");
return 0;
}
CmMac 20-Dec-13 22:12pm    
I use ::ExecuteMAXScriptScript("lskjfd"); in the 3dmax plugin project it runs ok.But I can't run in my console project.
Ron Beyer 20-Dec-13 22:19pm    
I'm sure that the script runs in an environment set up to support it, does it say that you can run these functions outside of 3DSM?
CmMac 20-Dec-13 22:21pm    
I know,but when I complied an dll with this function and import into and max plugin project,it also can't run it.Why?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900