Null reference exception
-
Hi, When I am using _bstr_t variable (member variable) then I am getting Null Reference exception while destorying the class object.In that class,I am assigning different values to _bstr_t member variable. When we are assigning different values to that variable do we need to allocate any memory for that variable explicitly before assigning the values to it. or else how can we solve this problem. Please give to me any suggestions Thanks & regards, Narasimharao
knarasimharao
-
Hi, When I am using _bstr_t variable (member variable) then I am getting Null Reference exception while destorying the class object.In that class,I am assigning different values to _bstr_t member variable. When we are assigning different values to that variable do we need to allocate any memory for that variable explicitly before assigning the values to it. or else how can we solve this problem. Please give to me any suggestions Thanks & regards, Narasimharao
knarasimharao
Can you post some relevant code.How you are using the variables. Did you try and debug your application?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Hi, When I am using _bstr_t variable (member variable) then I am getting Null Reference exception while destorying the class object.In that class,I am assigning different values to _bstr_t member variable. When we are assigning different values to that variable do we need to allocate any memory for that variable explicitly before assigning the values to it. or else how can we solve this problem. Please give to me any suggestions Thanks & regards, Narasimharao
knarasimharao
Can you show some code ? One possiblility is that, BSTR wrapped under it is freed already.
Prasad Notifier using ATL