> Н.Н.Полещук
#include "StdAfx.h"
#include "resource.h"
[b]// Добавил следующее
#include "adesk.h"
#include <tchar.h>
[/b]
//-----------------------------------------------------------------------------
#define szRDS _RXST("")
//-----------------------------------------------------------------------------
//----- ObjectARX EntryPoint
class CBook1App : public AcRxArxApp {
public:
CBook1App () : AcRxArxApp () {}
virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
// TODO: Load dependencies here
// You *must* call On_kInitAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
// TODO: Add your initialization code here
return (retCode) ;
}
virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
// TODO: Add your code here
// You *must* call On_kUnloadAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
// TODO: Unload dependencies here
return (retCode) ;
}
virtual void RegisterServerComponents () {
//----- Self-register COM server upon loading.
if ( FAILED(::DllRegisterServer ()) )
acutPrintf (_RXST("Failed to register COM server.\n")) ;
}
public:
// - Book1._MyCommand1 command (do not rename)
static void Book1_MyCommand1(void)
{
// Add your code for command Book1._MyCommand1 here
[b]acutPrintf(_T("Система проектирования, 2007 г."));[/b]
}
public:
// ----- ads_Book symbol (do not rename)
static int ads_Book(void)
{
//----- Remove the following line if you do not expect any argument for this ADS function
struct resbuf *pArgs =acedGetArgs () ;
// TODO: add your code here
[b]acutPrintf(_T("Система проектирования, 2007 г."));[/b]
// TODO: Replace the following line by your returned value if any
acedRetVoid () ;
return (RSRSLT) ;
}
} ;
//-----------------------------------------------------------------------------
IMPLEMENT_ARX_ENTRYPOINT(CBook1App)
ACED_ARXCOMMAND_ENTRY_AUTO(CBook1App, Book1, _MyCommand1, MyCommand1, ACRX_CMD_TRANSPARENT, NULL)
ACED_ADSSYMBOL_ENTRY_AUTO(CBook1App, Book, true)
При компиляции
1>Compiling...
1>acrxEntryPoint.cpp
1>Linking...
1> Creating library Debug/Book1.lib and object Debug/Book1.exp
1>rxapi.lib(libinit.obj) : warning LNK4099: PDB 'rxapi.pdb' was not found with 'C:\ObjectARX 2007\lib\rxapi.lib' or at 'd:\Project\Book1\Book1\Debug\rxapi.pdb'; linking object as if no debug info
1>rxapi.lib(rxdmain.obj) : warning LNK4099: PDB 'rxapi.pdb' was not found with 'C:\ObjectARX 2007\lib\rxapi.lib' or at 'd:\Project\Book1\Book1\Debug\rxapi.pdb'; linking object as if no debug info
1>acedapi.lib(acedstub.obj) : warning LNK4099: PDB 'corehdr.pdb' was not found with 'C:\ObjectARX 2007\lib\acedapi.lib' or at 'd:\Project\Book1\Book1\Debug\corehdr.pdb'; linking object as if no debug info
1>acedapi.lib(acedcls.obj) : warning LNK4099: PDB 'corehdr.pdb' was not found with 'C:\ObjectARX 2007\lib\acedapi.lib' or at 'd:\Project\Book1\Book1\Debug\corehdr.pdb'; linking object as if no debug info
1>Embedding manifest...
1>Build log was saved at "file://d:\Project\Book1\Book1\Debug\BuildLog.htm"
1>Book1 - 0 error(s), 4 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Arx-файл создаётся
при загрузке в AutoCAD2007 выдаёт
Runtime Error!
Progran: C:...
R6033
- Attempt to use MSIL code from this assembly during native code initialization
This indicates a bug in your application. It is most likely the result of calling an MSIL-compiled (/clr) function from a native constructor or from DllMain
и вешает систему
Что не так я сделал? Помогите пожалуйста