Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default api call routines

So when you say you're using DLL's I'm assuming you have something like

Public Function Declare ......

instead of instatiation of a COM object with

CreateObject etc.

That being the case....

The problem with DLL's is they execute 'in proces's. This means the DLL is
brought into the memory space occupied by the Excel process and anything
which goes wrong within the DLL will cause the whole process (Excel
included) to crash & burn. Ok that's the theory of DLL's over, this is just
an explanation of why it's bringing down Excel incase you didn't know.

There's not a lot you can do when calling a DLL. It's a black box and
resource allocation/cleanup etc. will all be handled by it.

I would invest some time in nailing down what circumstances causes the crash
then try to have a think about a workaround. I'd also check to see if there
are any initialisation procedures etc. you have to call prior to execution
of the function.

This is more advanced but another way would be to wrap the call to the DLL
within a COM object itself. A kind of broker object. This would be a COM
exe. That way if the DLL itself crashed it's only going to bring down the
broker and as you instantiate a new one for each call Excel will just carry
on as normal. This would be my choice.


--

Regards,


Bill Lunney
www.billlunney.com

"anthony" wrote in message
...
Hi there

I am using third party DLL files to link my spreadsheets to a cash

register
to download sales files.
The system works fine except that my spreadsheets crash quite often. It
seems that it is loading the DLL files into memory but it is not releasing
it from memory when it has finished.

Is there a command I can use to free the DLL file from memory.

Thank you

Anthony




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default api call routines

I don't know if this is applicable or not, but it is something you could try
to see if it unloads the DLL and if unloading the DLL makes a difference.


http://support.microsoft.com/default...b;en-us;129514
PRB: Loading and Unloading DLLs in the Design Environment

Code in Excel always runs in design mode.

Regards,
Tom Ogilvy



"anthony" wrote in message
...
Hi there

I am using third party DLL files to link my spreadsheets to a cash

register
to download sales files.
The system works fine except that my spreadsheets crash quite often. It
seems that it is loading the DLL files into memory but it is not releasing
it from memory when it has finished.

Is there a command I can use to free the DLL file from memory.

Thank you

Anthony




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default api call routines

Hi there

I am using third party DLL files to link my spreadsheets to a cash register
to download sales files.
The system works fine except that my spreadsheets crash quite often. It
seems that it is loading the DLL files into memory but it is not releasing
it from memory when it has finished.

Is there a command I can use to free the DLL file from memory.

Thank you

Anthony


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA Wookbook Routines Michael Kintner Excel Discussion (Misc queries) 1 August 7th 07 02:16 PM
VBA - sub routines Help please Richard Wrigley New Users to Excel 3 November 23rd 06 03:06 AM
VBA routines - help please Richard Wrigley Excel Discussion (Misc queries) 1 November 22nd 06 07:15 PM
Excel Statistical Functions and Routines David A. Heiser Excel Worksheet Functions 0 June 3rd 05 05:27 PM
Excel Statistical Functions and Routines David A. Heiser Excel Worksheet Functions 1 June 2nd 05 03:52 AM


All times are GMT +1. The time now is 11:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"