Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdd icons to menu bar Pin
Abinash Mohanty4-Jan-10 17:41
Abinash Mohanty4-Jan-10 17:41 
AnswerRe: Add icons to menu bar Pin
KingsGambit4-Jan-10 17:56
KingsGambit4-Jan-10 17:56 
AnswerRe: Add icons to menu bar Pin
Madhu Nair4-Jan-10 18:01
Madhu Nair4-Jan-10 18:01 
QuestionList Contol Pin
DevelopmentNoob4-Jan-10 15:11
DevelopmentNoob4-Jan-10 15:11 
QuestionRe: List Contol Pin
David Crow4-Jan-10 15:57
David Crow4-Jan-10 15:57 
AnswerRe: List Contol Pin
YoYo_Yao4-Jan-10 16:16
YoYo_Yao4-Jan-10 16:16 
QuestionVS 2008 - CDialogBar - older application Pin
Tony Teveris4-Jan-10 7:53
Tony Teveris4-Jan-10 7:53 
QuestionCComPtr<istream> releasing problem</istream> Pin
A&Ms4-Jan-10 1:32
A&Ms4-Jan-10 1:32 
Hi,
I have used CComPtr class to declear two IStream type variable like below:
CComPtr<IStream> m_pStream;
CComPtr<IStream> m_pStream2;

and some where in my code I Create a stream on a file and let my m_pStream variable point at it like below:
::SHCreateStreamOnFileW(FileName,STGM_READWRITE | STGM_SHARE_DENY_WRITE,&pStream);

Now I want to do sth cause the first Stream variable "m_pStream" release the specified File, so I could create the stream on the same file and let my secound Stream variable m_pStream2 points at it like below:
::SHCreateStreamOnFileW(FileName,STGM_READWRITE | STGM_SHARE_DENY_WRITE,&pStream2);

because my Stream vars are defined with CComPtr class I coudn't use the Release method of my Stream variables.
even I have tested nullifying the first Stream variable but it didn't solve my problem.

What should I do?
AnswerRe: CComPtr releasing problem Pin
KarstenK4-Jan-10 1:57
mveKarstenK4-Jan-10 1:57 
GeneralRe: CComPtr releasing problem Pin
A&Ms4-Jan-10 3:27
A&Ms4-Jan-10 3:27 
GeneralRe: CComPtr releasing problem Pin
KarstenK4-Jan-10 3:34
mveKarstenK4-Jan-10 3:34 
GeneralRe: CComPtr releasing problem Pin
A&Ms4-Jan-10 4:42
A&Ms4-Jan-10 4:42 
GeneralRe: CComPtr releasing problem Pin
KarstenK4-Jan-10 20:35
mveKarstenK4-Jan-10 20:35 
AnswerRe: CComPtr releasing problem Pin
Stephen Hewitt4-Jan-10 3:13
Stephen Hewitt4-Jan-10 3:13 
GeneralRe: CComPtr releasing problem Pin
A&Ms4-Jan-10 3:29
A&Ms4-Jan-10 3:29 
GeneralRe: CComPtr releasing problem Pin
Stephen Hewitt5-Jan-10 3:54
Stephen Hewitt5-Jan-10 3:54 
AnswerRe: CComPtr releasing problem Pin
KingsGambit4-Jan-10 18:16
KingsGambit4-Jan-10 18:16 
GeneralRe: CComPtr releasing problem Pin
A&Ms4-Jan-10 18:50
A&Ms4-Jan-10 18:50 
GeneralRe: CComPtr releasing problem Pin
KingsGambit4-Jan-10 19:09
KingsGambit4-Jan-10 19:09 
QuestionUser permission problem with MFC Pin
bhanu_85094-Jan-10 0:38
bhanu_85094-Jan-10 0:38 
AnswerRe: User permission problem with MFC Pin
CPallini4-Jan-10 1:02
mveCPallini4-Jan-10 1:02 
AnswerRe: User permission problem with MFC Pin
KarstenK4-Jan-10 2:01
mveKarstenK4-Jan-10 2:01 
GeneralRe: User permission problem with MFC Pin
bhanu_85094-Jan-10 5:32
bhanu_85094-Jan-10 5:32 
GeneralRe: User permission problem with MFC Pin
KarstenK4-Jan-10 20:38
mveKarstenK4-Jan-10 20:38 
AnswerRe: User permission problem with MFC Pin
Rolf Kristensen6-Jan-10 10:45
Rolf Kristensen6-Jan-10 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.