473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Inability to scale DLL code

Using VC++ 5.0

I have a DLL created by a previous employee that is used for reading from
text files and databases and outputs to a database and ASP pages. I am
attempting to convert the DLL to input/output UNICODE in specific places.

I am able to read in the UNICODE text files (the code for which is in
various classes), however when trying to scale the output code (which is
called from an ASP page) I encounter a segmentation fault when performing the
initalization of the DLL object (though I can create the ASP object
successfully).

The only change I make is adding a BSTR declaration (BSTR wcGoalStmt =
SysAllocString("")) in the function that is called by the ASP page which
resides in the core object of the DLL. However, I receive the error when I
call an initalization function elsewhere in the core object of the DLL, which
is the first call made to the DLL. When I remove the BSTR declaration the DLL
works correctly (though not outputting UNICODE).

Why would the addition of a variable declaration cause the first call to a
DLL to fail?

Thanks in advance,
Chris Reddy
Infotech
Nov 17 '05 #1
1 1062
"reddz" <re***@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
Using VC++ 5.0

I have a DLL created by a previous employee that is used for reading from
text files and databases and outputs to a database and ASP pages. I am
attempting to convert the DLL to input/output UNICODE in specific places.

I am able to read in the UNICODE text files (the code for which is in
various classes), however when trying to scale the output code (which is
called from an ASP page) I encounter a segmentation fault when performing
the
initalization of the DLL object (though I can create the ASP object
successfully).

The only change I make is adding a BSTR declaration (BSTR wcGoalStmt =
SysAllocString("")) in the function that is called by the ASP page which
resides in the core object of the DLL. However, I receive the error when I
call an initalization function elsewhere in the core object of the DLL,
which
is the first call made to the DLL. When I remove the BSTR declaration the
DLL
works correctly (though not outputting UNICODE).

Why would the addition of a variable declaration cause the first call to a
DLL to fail?
Maybe the rules of conduct for assigning releasing resources are not
maintained. That's the drawback of using C++ :<
Note that you never can mixup unicode/ansi string manipulation without
thouroughly redesiging your solution in C++. If the project was ansi based,
just consider to rewrite the component in VB6 which is not a bad choice at
all and VB6 performs very well for ASP pages.
Thanks in advance,
Chris Reddy
Infotech


Nov 17 '05 #2

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

Similar topics

36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
5
by: Guess | last post by:
The situation is as follows: 1. I would like to serve a web page that takes considerable time to process. 2. While the page is processing, the client displays an appropriate wait message. What...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
3
by: John Bonds | last post by:
I'm looking for some sort of digital scale to integrate into .NET. Does anybody know of anything (like a postal scale) that attaches to USB, serial or whatever that comes with a DLL or an API...
3
by: Jay Patel | last post by:
Hello, I need to write visual basic.net code to interface with a Mettler Toledo Shipping Scale that interfaces with a PC via USB or a serial port. I have seen example code on how to communicate...
4
by: Generic Usenet Account | last post by:
In our environment we have several C++ header files that have some inline member function definitions. For some reason, I am unable to step through the source code of those member functions in my...
0
by: TonyJ | last post by:
Hello! We have a pc running a form application. If I push some buttons in this application I want to send some commands to a scale which is connected to a specific IP address. When I sent a...
19
by: Matteo Migliore | last post by:
Hi! I've to scale a vector of numbers of size N to a vector of size M. The trasformation is like a zoom on images but I need on a vector. The second size can be M >= N or M <= N, M 0. The...
22
by: Jesse Burns | last post by:
I'm about to start working on my first large scale site (in my opinion) that will hopefully have 1000+ users a day. ok, this isn't on the google/facebook scale, but it's going to be have more hits...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.