To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 14156
14155  |  14157
Subject: 
Writing an LDDP plugin
Newsgroups: 
lugnet.cad
Date: 
Sat, 28 Oct 2006 21:20:59 GMT
Viewed: 
1447 times
  
I'm in the process of writing a plugin for LDraw Design Pad. Problem is, I can't
get the darn thing to work in the program. When I compile the .dll and move it
to the Plugins directory for LDDP, and open the program, the menu entry for my
plugin shows 3 characters of garbage text; so does its description. There seems
to be no indication that the Plugin_Info() function is called correctly at all.

I think the problem is with the declaration. LDDP's sample C++ plugin is
designed for Borland, and I'm using Microsoft Visual C++. This is the spec for
the original:

extern "C" void WINAPI __declspec(dllexport) Plugin_Info(unsigned char CaseID,
char *buffer, unsigned char maxlength)

That doesn't compile for me; the compiler freaks out about one of those
keywords. If I move WINAPI to after __declspec(), it compiles, but then the
plugin just doesn't work at all (producing the garbage text I mentioned above).
I've tried various combinations of things, including removing the extern "C"
bit, but nothing works. Has anyone successfully compiled an LDDP plugin with
VC++ who can explain what I need to change?



Message has 1 Reply:
  Re: Writing an LDDP plugin
 
Please disregard the previous message. I was able to compile and use the plugin by creating a .def file, and using this syntax: extern "C" void __declspec(dllexport) WINAPI Plugin_Info(unsigned char CaseID, char *buffer, unsigned char maxlength) (...) (18 years ago, 28-Oct-06, to lugnet.cad)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR