|
try _tcscpy_s function instead strcpy function
take a look in strpy definition strcpy work only ASCII , but TCHAR is char if Unicode is not defined or TCHAR is wchar_t if Unicode is defined
|
|
|
|
|
Code Segment is
token=strtok(userid,_T(";"));
What about this error?
'strtok' : cannot convert parameter 2 from 'const wchar_t [2]' to 'const char *'
|
|
|
|
|
It looks like you're doing a UNICODE build, but, neverthless, userid is declared as char * (or char userid[] ) insetad of TCHAR * and, moreover, you're not using the generic text equivalent of strtok (i.e. _tcstok ).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This is my code segment.
CString timestamp;
int year = _atoi64((LPCTSTR)timestamp.Left(4));
I am getting an error like
'_atoi64' : cannot convert parameter 1 from 'LPCTSTR' to 'const char *'
How can I remove it?
Thanks.
|
|
|
|
|
try _ttoi(static_cast<LPCTSTR>(timestamp.Left(4)));
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Thanks Anshuman, It worked for me.
|
|
|
|
|
BTW, the static_cast<lpctstr>() is useless and can be omitted
|
|
|
|
|
_AnsHUMAN_ wrote: try _ttoi(static_cast<lpctstr>(timestamp.Left(4)));
Just adding to toxcct's reply, CString has the LPCTSTR operator!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi all,
I m creating a dialog base application and running it in hide mode.the GUI of application not visible.
Application wants a permission to run as admin.
i want this application when i execute the application on any PC than its running over it till the PC opened,when the system restart than its automatically start with system.I think it is done by Window service.
but i have no idea of Window service.
I m also add this exe vaule in registry for startup its works fine but in case of UAC enabled in VISTA the strtup program is blocked because its not have permission to run as admin.
so please tell me how can i run it on startup with admin permission.
and tell me how can i run it over PC every time.
please suggest me right way and method to do this.
if possible please explain me with example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
if you don't want to show gui part to user and run your program in background services are best choices, there are numerous application available on net which can your program as service (without actually modifying your source code). search " running executable as service" on net
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
please help me....
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Let me get it right... You have an executable, you don't want to show an UI, it must run at startup, and with admin rights and should bypass UAC.
May I ask you what exactly does your app do?!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Actully i working on Client_server type application.
so for sending continue information to server client exe must exist on client PC.
my exe running on hide mode and sending information to server for connection.
thats why i doing this.
so please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: my exe running on hide mode and sending information to server...
What kind of information? Does the user have control over this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
My application is basically a Client-Server application,Client side exe send information about the connection of Client to server.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I want to write a web camera driver by using DriverStudio, but I can't find usfull instruction of how to write a camera driver. Will somebody be kind enough to give me some information. Thank you very much!
emergency help!
|
|
|
|
|
Does this help?[^]
jiambet wrote: emergency help!
That's another nice way of saying "It's urgent please"
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
How can I allow the user to use Enter key to break the line inside of a multiline CEdit control ?
Thanks in advance.
Best Regards - Yovav Gad
CEO and founder of MicroMighty, Inc.
|
|
|
|
|
Yovav wrote: How can I allow the user to use Enter key to break the line inside of a multiline CEdit control ?
Set the "want return" property to true for the edit control under the properties
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
My "Want Return" property is True but its still doesn't work,
I'm using the ON_EN_CHANGE event OnEnChangeEditPlanData()
(but VK_RETURN does not even go in there)
Also using Vista 64 but dont think it should matter.
Best Regards - Yovav Gad
CEO and founder of MicroMighty, Inc.
|
|
|
|
|
OK, Finally got it,
I found out that I was processing VK_RETURN on PreTranslateMessage of that form
(Opps )
Thanks anyways.
Best Regards - Yovav Gad
CEO and founder of MicroMighty, Inc.
|
|
|
|
|
Yovav wrote: How can I allow the user to use Enter key to break the line inside of a multiline CEdit control ?
Check property multiline of edit control... also you can check out want return property of edit control
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I think he has set it already.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
yeap i know, thats why corrected my mistake
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
OK, Finally got it,
I found out that I was processing VK_RETURN on PreTranslateMessage of that form
(Opps )
Thanks anyways.
Best Regards - Yovav Gad
CEO and founder of MicroMighty, Inc.
|
|
|
|