Using Windows DLLs

Mr X x at monsieurx.com
Fri Mar 14 04:55:03 EST 2003


Larry,

Damn great! im on it tomorrow!

Xavier


> -----Original Message-----
> From: metacard-admin at lists.runrev.com
> [mailto:metacard-admin at lists.runrev.com]On Behalf Of
> Larry_R_Huisingh at rl.gov
> Sent: Thursday, March 13, 2003 17:24
> To: metacard at lists.runrev.com
> Subject: RE: Using Windows DLLs
>
>
> > Subject: Using Windows DLLs
>
> > Hello scripters,
> >
> > After pounding the web and mailists to find "HOW TO" use
> > DLL's, and finding
> > where to put them in MC, it seems there is no way to handle
> > Windows DLLs as
> > provided by the WINNT OS. Im wondering if anyone has had any success
> > building a NTtoMCdllbridge.dll or how else to do this? FYI, using
> > SHELL+Rundll32 doesn't return info so it's useless.
> >
> > With MC+Shell+reskit on NT, after a few hundred calls coming from MC
> > shell(), user32.dll returns errors for each call (cacls or
> > rmtshare for
> > example) and then just cannot be used again without having a
> > pop-up error
> > complaining - I can't reboot the server every hour either...
> >
> > Naturally, this only happens on MC, never elsewhere ( i.e.
> > *.cmd batch -
> > even 20 simultaneous batches dont do this...)... If someone has a
> > solution/reason for this... Possibly handles not being
> > released by MC though
> > they are not visible in servermanager...
> >
> > Im interested in calling c:\winnt\system32\user32.dll
> > directly from MC in
> > winnt4 sp6... This would also avoid Shell slow-speed problems.
> >
> > Thanks to anyone who can answer this!
> >
> > Cheers
> > Xavier
>
> >From my experience you can't call Windows DLL functions directly.
>
> I believe the only way to do it is to write your own DLL in C/C++ that
> serves as an interface between your MC app and the various
> Windows API calls
> (which are located in the DLL files).  Your DLL would take data
> from your MC
> app and make the calls to your desired Windows API functions in a standard
> C/C++ style.  Your DLL would then pass data back to your MC app either via
> parameters or even MC objects.  You would put _your_ DLL into the folder
> with your MC app.  Leave the Windows DLL's where they are.
>
> Take a look at the samples provided with MC.  My MC app called my own DLL
> which in turn did the actual Windows API calls.  When you use the
> API calls
> in C/C++ you don't really care which DLL is needed - Windows and your
> compiler takes care of that.  This is a very fast method and there are no
> command windows popping up to handle.
>
> I hope this helps.
>
> Larry Huisingh
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list