|
I don't know what technologies you using or what types your variables are. I assume m_pStm is an IStream . Your cast to IDispatch* worries me: this can't be an up-cast as IStream doesn't derive from IDispatch ; it's possible that it's a down-cast but I find that unlikely. I suspect this cast isn't valid and if this is the case this is a perfect opportunity for me to rant about the evils of the C-style cast:
C-style casts; just say no. If you use this instead you will have more type checking at compile time which will catch many bad casts (but not all):
rs->Save(static_cast<IDispatch*>(m_pStm), adPersistXML);
With this style of casting you can't cast between unrelated types; which is almost always the programmer's intent.
Steve
|
|
|
|
|
You don't cast COM interfaces like this (the exception is that inside the implementation you may do so). Use IUnknown::QueryInterface for this purpose.
Steve
|
|
|
|
|
m_pStm is an instance of _StreamPtr,and save works,I just don't know how to open a Stream with Recordset::Open()
contact me :xiaolinzi0941@hotmail.com
|
|
|
|
|
I understand and know how to use the command begin trans, commit and also rollback in MS SQL Server. However, inside the MFC C++ coding, how could I issue all these commands to the database(in MS SQL CE form)?
Please help and thanks =)
Ting
|
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I'd like to write come code to change the mouse properties for right-handed to left-handed, but I don't know how can I do that. Any clue or artical on internet?
|
|
|
|
|
Perhaps SwapMouseButton will help you.
Steve
|
|
|
|
|
How to create a CBitmap object from a bitmap file?
.
|
|
|
|
|
|
CBitmap m_Bit;
m_Bit.Attach((HBITMAP)::LoadImage(NULL,Filename,
IMAGE_BITMAP,0,0,
LR_LOADFROMFILE|LR_CREATEDIBSECTION));
|
|
|
|
|
Hi,
Can't I create it using Bitmap Rescorce i.e. IDB_BITMAP1.
Thanks,
Aniket
|
|
|
|
|
try
CBitmap m_Bit;
m_Bit.LoadBitmap(IDB_BITMAP1);
|
|
|
|
|
Hi,
Thanks for your reply.
CBitmap m_Bit;
m_Bit.LoadBitmap(IDB_BITMAP1);
HBITMAP hSourceBitmap = (HBITMAP) m_Bit;
Is this a correct way?
Aniket
-- modified at 5:00 Thursday 11th May, 2006
|
|
|
|
|
why you use HBITMAP hSourceBitmap you can use m_Bit.m_hObject and i think you dont need to hbitmap handle
|
|
|
|
|
|
How can i hide a procees showing itself in processes list in windows xp.
is it possible.??
|
|
|
|
|
Why would you want to?
100% natural. No superstitious additives.
|
|
|
|
|
I need this for a project that project requires that program will run as service and service listening to some port. it can run any other application using some commands. and new processes that are started through service shud not be seen in processes list
i just want to know is it possible to hide a process from processes list.
|
|
|
|
|
AFAIK, that is not possible, unless you write some kernel extension. This is what rootkits normally do, and is not considered "kosher". It's also a bad idea to hide processes like that, in case you need to kill a process manually.
Why the tough restriction on process visibility, if I may ask?
--
100% natural. No superstitious additives.
|
|
|
|
|
You souldn't want to; unless you're a virus writer or some such.
Steve
|
|
|
|
|
you asked like here[^] I believe thats not good
|
|
|
|
|
Hi
How can I access public variables of CChildFrame and CMyApp from my CView?
Or:
How to access CChildFrame and CMyApp from any other class?
I tried:
<br />
CMyApp theApp;<br />
theApp.public_data = ...;<br />
but this is not working.
Please HELP me
CU Timen
|
|
|
|
|
|
hi all
i have a mfc dialog application in Visual Studio 2005.
How to limit it to one instance ?
thank you.
|
|
|
|