473,471 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Advice on DLL parameters please

Hi,

I have an Excel spreadsheet that contains a VBA macro. However, this runs
slowly! I have written the code in C++ which works. Currently the
interface between the VBA / Excel system and the C++ program is via a file.
i.e. data is exported in Excel & read into the C++ program, processed &
written out to a file by C++ & them imported into Excel.

I know I can use a DLL written in C++ & callable from VBA (i've already done
that). I've mastered the problems of calling a DLL with an array parameter
sucessfully too. My question is, is there a maximum amount of data that I
can pass through a DLL call? Either a physical maximum limit, or an
advisable maximum.

Any advice / explanation would be greatly appreciated.

Thanks

Simon
Jul 22 '05 #1
1 1122
News wrote:
I have an Excel spreadsheet that contains a VBA macro.
For best results, use Google Groups to find newsgroups that cover VBA. We'l
try to help, but only if you promise to follow up on a better group.
However, this runs
slowly! I have written the code in C++ which works. Currently the
interface between the VBA / Excel system and the C++ program is via a file. i.e. data is exported in Excel & read into the C++ program, processed &
written out to a file by C++ & them imported into Excel.
That's slow simply because the data thread thru import systems tuned to
databases, not flat text files.
I know I can use a DLL written in C++ & callable from VBA (i've already done that). I've mastered the problems of calling a DLL with an array parameter
sucessfully too. My question is, is there a maximum amount of data that I
can pass through a DLL call? Either a physical maximum limit, or an
advisable maximum.


Call the DLL over and over again. That's still going to be faster.

The number of elements allowed in a C++ array is implementation-defined, but
it's not worth knowing. If you tried to put in thousands, they'd force the
stack to re-page, so you'd be slow again.

Next time you do this, learn ActiveX. The ATL library makes building quicky
little wrappers very easy.

--
Phlip
http://www.xpsd.org/cgi-bin/wiki?Tes...UserInterfaces
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: J.Bijleveld | last post by:
Hello colleagues, At this moment we have a real big problem using a .NET application with an Oracle database (v8.1.6). I hope someone has encountered this problem before and is able to help me...
2
by: J.Bijleveld | last post by:
Hello colleagues, At this moment we have a real big problem using a .NET application with an Oracle database (v8.1.6). I hope someone has encountered this problem before and is able to help me...
3
by: Oasis | last post by:
Hello, I'm new to c#. I have situation where I want to execute a number of insert statements that differ only in a few dynamic values. When I was a Java programmer, I would do this with a...
2
by: SophistiCat | last post by:
Hi, I am working on a computational program that has to read a number of parameters (~50) from an input file. The program contains a single class hierarchy with about a dozen member-classes or...
1
by: LenS | last post by:
If this is the wrong place to post this, please advise better place. Otherwise, I have created the following python program and it works. Running on XP. I think I am now at that stage of learning...
1
by: Neil | last post by:
Hello, I have a SQL Server 2000 database with an Access 97 front end. I want to run stored procedures, (not nessessarily ones which return records either - action type queries for adding new...
2
by: John Baker | last post by:
Hi: I have PDF995 installed (and registered) and contacted the PDF995 tech support for help in setting up to automatically print Access reports using PDF 995. As a result I received the...
1
by: Ramin | last post by:
Hi, I have 2 textboxses on asp.net page textbox=description, textbox2=quantity What I want when I enter values for them it stored temporarily or smth. like that and then when I click order...
14
by: =?Utf-8?B?QWRyaWFuIEI=?= | last post by:
Hi - sorry if this is not the best place to post, but need advice and would appreciate some thoughts. I inherited a boxed set MCAD self-study course which I am about to launch into. The course...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.