Problem with allocating stl::string object 
Author Message
 Problem with allocating stl::string object

I am calling the following func from another C++ dll and it causes an access
violation when
i try and allocate configPath variable with a constant string value.

Am i overlooking something here ?
Environment - MS VC++ 6.0

void initfunc(string& errormesg,PSEMylist *mylist)
{

 string configPath="E:\\Program Files\\Informatica\\Informatica PowerCenter
SDK 6.0\\samples\\sdkdemordr\\Release\\Enlist.conf";
...........

Quote:
}



Fri, 31 Dec 2004 13:40:00 GMT  
 Problem with allocating stl::string object
Do you use the appropriate version of the C RTL in all DLLs? (the shared
version is needed for multi-DLL projects where memory is allocated in one
place and freed in another, etc)

K. Lilov
Str Library at http://www.utilitycode.com/str


Quote:
> I am calling the following func from another C++ dll and it causes an
access
> violation when
> i try and allocate configPath variable with a constant string value.

> Am i overlooking something here ?
> Environment - MS VC++ 6.0

> void initfunc(string& errormesg,PSEMylist *mylist)
> {

>  string configPath="E:\\Program Files\\Informatica\\Informatica
PowerCenter
> SDK 6.0\\samples\\sdkdemordr\\Release\\Enlist.conf";
> ...........
> }



Fri, 31 Dec 2004 17:37:53 GMT  
 Problem with allocating stl::string object
Yes, that was the problem . We were using libcmt.lib instead of msvcrt.lib.
Thanks a lot
- Krishnan

Quote:
> Do you use the appropriate version of the C RTL in all DLLs? (the shared
> version is needed for multi-DLL projects where memory is allocated in one
> place and freed in another, etc)

> K. Lilov
> Str Library at http://www.utilitycode.com/str



> > I am calling the following func from another C++ dll and it causes an
> access
> > violation when
> > i try and allocate configPath variable with a constant string value.

> > Am i overlooking something here ?
> > Environment - MS VC++ 6.0

> > void initfunc(string& errormesg,PSEMylist *mylist)
> > {

> >  string configPath="E:\\Program Files\\Informatica\\Informatica
> PowerCenter
> > SDK 6.0\\samples\\sdkdemordr\\Release\\Enlist.conf";
> > ...........
> > }



Sat, 01 Jan 2005 13:09:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. heap problem with stl vector elements allocated in a dll

2. problems allocating objects

3. Problem statically allocating CSting objects

4. Problems with using objects allocated in another DLL

5. STL string object and console applications

6. STL and string object

7. Problems with STL function objects

8. STL String problem in VC7

9. problem with global operator new/delete and STL string

10. Linking Problem Using STL string

11. STL/MFC problem with set<string>

12. Problem with STL string class and MFC Serialize()

 

 
Powered by phpBB® Forum Software