Global Variable's Data Missing...... 
Author Message
 Global Variable's Data Missing......

Hi,

I have written a MTS COM dll in VC++. In the " stdafx.h " I have declared a
variable as

static char MyVar [10000];
static char* MyVar2;

Inside a private function, I am allocating mem for MyVar2, & copying a
string and to the MyVar variables. So both the variable have the same value.
When I exit that function the both teh variable's data is vanishing. Can
someone help me on this matter...???

regards
Ganesh



Tue, 23 Sep 2003 18:39:50 GMT  
 Global Variable's Data Missing......
If you have not received a good reply, then you might consider posting some
more complete example
code.
--
Randy Charles Morin
http://www.kbcafe.com/randycharlesmorin


Quote:
> Hi,

> I have written a MTS COM dll in VC++. In the " stdafx.h " I have declared
a
> variable as

> static char MyVar [10000];
> static char* MyVar2;

> Inside a private function, I am allocating mem for MyVar2, & copying a
> string and to the MyVar variables. So both the variable have the same
value.
> When I exit that function the both teh variable's data is vanishing. Can
> someone help me on this matter...???

> regards
> Ganesh




Wed, 24 Sep 2003 20:40:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Global Variable's Data Missing......

2. Global Variable's Data Missing......

3. Uninitialized global data (was Re: Global variables)

4. Global variable or not global variable

5. 'Global' variables

6. static local variables vs global variables

7. Variables & Global Variables

8. global variables and external variables?

9. Member Variables' data type

10. help, can't export data variable from dll

11. 'missing 'prototype'? (turbo c)

12. Behavior of a missing 'va_end'

 

 
Powered by phpBB® Forum Software