|
It seems that you need to ShellExecute for run other applications of your program.(anyway you didnt answer to my reply on your previous question ).
|
|
|
|
|
Thanks for the help I might not need to do that if I can solve the error LNK1152
|
|
|
|
|
Did you get this error when you used of ShellExecute?
|
|
|
|
|
Hi all,
On a database I have a table, with two columns, named as FileName and the FileType. On the table I define the data type as 'Text'. I try to add some data to it within my code as follows.
_RecordsetPtr pRec;
ostringstream sqlCmd;
char chState = 'R';
bool bState = true;
if(bState)
chState = 'R';
else
chState = 'T';
sqlCmd << "INSERT INTO tblGroupState(DiskFileName, FileState) VALUES(" << fileName << ", "
<< chState << ")";
try
{
pRec = m_pConn->Execute(sqlCmd.str().c_str(), NULL, adCmdText);
pRec->Close();
}
catch(_com_error &e)
{
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
printf("\n Source : %s \n Description : %s \n",(LPCSTR)bstrSource,(LPCSTR)bstrDescription);
}
Here, m_pConn is the connection to the database and it is perfectly work. Because I used it previously.
My code gives an error, Can you guys find that where I'm going wrong with.
I appreciate your help all the time...
Eranga
|
|
|
|
|
In order to lessen the need for psychic powers, you may want to tell us what the error is, and where it's given?
Iain.
|
|
|
|
|
Yep this is the error.
bstrSource "Microsoft OLE DB Provider for SQL Server" (1)
bstrDescription "The name "G00001_020_01.srf" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted."
I appreciate your help all the time...
Eranga
|
|
|
|
|
So what is G00001_020_01.srf?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David,
It's the file name I want to add. Actually I found my mistake. That is, I manipulate the sql command in wrong way. Not it is fixed. Thanks for your all help. And sorry for the disturbing on my question.
I appreciate your help all the time...
Eranga
|
|
|
|
|
I am programming in VC++.
I want to enable/disable Local Area Connection.
|
|
|
|
|
I saw the same question answered just a few days ago. Do a long read of this forum, and your answer should be there!
I've been looking at changing IP addresses etc, and this is a dark murky area of the windows SDK...
Good luck,
Iain.
|
|
|
|
|
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Does anyone know where I can find a list of the icons used in the class view? In particular the ones added by Visual Sourcesafe 2005.
I've found the list of icons in VS2005 help, but it states "more icons may be added by your source control system".
|
|
|
|
|
Hi,
This may help:
http://msdn2.microsoft.com/en-us/library/ms181372(VS.80).aspx
Thanks.
--
Catherine Sea
Dynamsoft Corporation
www.dynamsoft.com
the leading developer of version control and issue tracking software
|
|
|
|
|
There is a static box and other controls like buttons, edit boxes etc on dialog. The class for static box is CMyStatic which is derived from CStatic. Program draw some lines on static box. Lines may go outside the static control when draw by mouse. While drawing any line the previous line is erased. But if previous line was outside the control(i.e. on dialog box) it's not erased. For that i call Invalidate of dialog box.But this gives the flickering problem. Please give any suggestion to solve this problem.
Manoj Kumar Chauhan
|
|
|
|
|
Use InvalidateRect()
Come online at:-
jubinc@skype
|
|
|
|
|
You either have to invalidate the dialog (as you're doing) and put up with the flickering, or...
...you can use SetROP2 (R2_NOT) to make the line XOR the pixel underneath, then draw it again using the same technique to put the pixels back as they were.
(don't forget to restore the ROP2 mode after drawing like I did...)
Iain.
|
|
|
|
|
I have tried with InvalidateRect but no change. Besides lines if i draw text then i cant invert pixel color.
Please give any other solution
Manoj Kumar Chauhan
|
|
|
|
|
You can always use double buffering.
Copy the current contents as a bitmap. As the drawing moves,
blt the bitmap to a memory dc, do the drawing at its new location
on the memory DC, then blt from the memory DC to the screen. It'll be
nice and smooth.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the good suggestion. But i'm already using a background image as a bitmap. All drawing i do on top of background image.
So i cant take all drawing in another bitmap.
Manoj Kumar Chauhan
|
|
|
|
|
MKUser wrote: i cant take all drawing in another bitmap
Can't or won't?
I know you "can". I do it for video/image window drawing, where the image is
offscreen, a snapshot of the window background is offscreen, all drawing is
done offscreen except for final blt. Appears smooooth.
Any time you redraw a background followed by a redraw of the foreground on
the screen, there's going to be flicker. You can't avoid it without doing it
in the background/memory.
If you can use other's suggestions by drawing/erasing only the "foreground"
using logical ops, then that's you're only other option.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can remove these MCI errors
1.
"MCIERR_INVALID_FILE" meaning of this is "The specified file cannot be played on the specified MCI device. The file may be corrupt or may use an incorrect file format."
2.
The specified file cannot be played on the specified MCI device. The file may be corrupt, not in the correct format,or no fill
modified on Wednesday, January 16, 2008 4:43:11 AM
|
|
|
|
|
Compiler, linker, or run-time errors? Do you suppose a relevant code snippet might be at all helpful?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Dude, I really believe you need to tell your supervisor that you can't do this project. I believe you simply don't have the depth to complete a project like this. You reposted the same question at least 7 times, and recieved answeres on every thread. You couldn't impletment the suggestions. You even had source code, examples, etc that would help you get the job done. I'm not trying to be rude, but this project is way out of your league, you need to give it up.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Hello!
I have an application that runs under the SYSTEM account (it's a Windows service).
Is there any possibility that I can make the service run under a limited user account? (I want to make the application access the network resources; running under SYSTEM forbiddens me to do that)
I must mention that I cannot afford to restart the SYSTEM application or create another process from it, that runs under that limited user account.
So, what I want is to make the service appear like running under the limited user account, on-the-fly, if I am permited to say it this way...
I've already tried ImpersonateLoggedOnUser(), but the application still runs under SYSTEM and I cannot connect to a proxy server this way.
Can anyone help?
Thanks in advance!
|
|
|
|
|
Look at the final two parameters to the CreateService function.
Judy
|
|
|
|