|
kapardhi wrote: add the library WINSCARD.lib in the Project Settings>>Link>> Category(INPUT)>> in library modules.
In both Debug and Release modes?
Also - does the linker know what directory it'll find the library in?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I also inculded the path where the WINSCARD.lib is present and selected "All Configurations" option that includes ARM4 Debug, Arm4 Relese, Emulator Debug and emulator release.
still the problem persists !
|
|
|
|
|
The only thing I can think of is this: are you using the correct version of the library ? By this I mean that you cannot use the win32 version of the library, because you are developping for winCE. I don't know this library so I can't tell you if it exists for winCE or not.
|
|
|
|
|
Stuart Dootson wrote: Also - does the linker know what directory it'll find the library in?
Probably yes, otherwise it would tell that it cannot open the library file.
|
|
|
|
|
That's a good point
|
|
|
|
|
Hi all,
i m using PROCESS_INFORMATION for Create Process,i create one by one multiple process ,
but after some time PROCESS_INFORMATION have null values and process not created successfully.
is there every time we need no initialize the PROCESS_INFORMATION or anything else.
please tell me wat can do for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You have to reinitialize the structure every time.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
«_Superman_» wrote: You have to reinitialize the structure every time.
i.e. Win32 API is not for the lazy guy.
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]
|
|
|
|
|
"_$h@nky_" wrote: but after some time PROCESS_INFORMATION have null values and process not created successfully.
The 'process not created successfully' bit bears examination. What did CreateProcess return (0, I presume) and, if it indicated failure, what does GetLastError return?
The PROCESS_INFORMATION struct is strictly an output of CreateProcess - you shouldn't have to re-initialize it every time, but it helps to do so, so you can more easily see (in the debugger) that the contents have changed.
|
|
|
|
|
with the using of GetLastError() error comes "The operation completed successfully."
now tell me wat can i do.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: with the using of GetLastError() error comes "The operation completed successfully."
This is when the process wasn't created?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
yes.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
And your code looks like this:
if (!CreateProcess(params))
{
DWORD err = GetLasError();
}
?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
yes
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi all,
i m using excel in my application,i want to get column name of excel sheet.
excel sheet having column name like A,B,C,D.... and so on.
so i want to get this name .
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hello All,
I use the following code at Client side to connect with server. In this program, when i start Server, client will stop or hang on the "connect" function. I am not getting where is problem in client program. Server side code i tested, but it is working.
I place the client side code below.
//// Client code ////
CString str;
int sock,iResult,iOptVal,iSenderAddrSize;
int BUFF_SIZE = 30,iError;
char recv_data[30];
char* localIP = "";
struct sockaddr_in server_addr,SenderAddr;
struct hostent * lpHostEntry;
WSADATA wsaData;
iSenderAddrSize = sizeof(SenderAddr);
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != NO_ERROR)
AfxMessageBox(_T("Error at WSAStartup()\n"));
if ((sock = socket(AF_INET, SOCK_STREAM,0)) == -1)
AfxMessageBox(_T("Error at Socket"));
gethostname(localIP,56);
lpHostEntry = gethostbyname(localIP);
server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(2050);
server_addr.sin_addr.s_addr = inet_addr("192.168.1.9");
iError = connect( sock, (SOCKADDR*) &server_addr, sizeof(server_addr) );
if(iError == SOCKET_ERROR){
iError = WSAGetLastError();
CString s1;
s1.Format(_T("Connect Error = %d"),iError);
AfxMessageBox(s1);
exit(1);
}
while(1){
memset(recv_data,0,sizeof(recv_data));
int iResult = recv(sock,recv_data,BUFF_SIZE,0) ;
if(iResult > 0)
{
recv_data[BUFF_SIZE] = '\0';
str = inet_ntoa(SenderAddr.sin_addr);
AfxMessageBox(str);
}
else{
iError = WSAGetLastError();
}
}
///
Pleae see the above code and give some some hint...
Thanks in advance..
|
|
|
|
|
Reply[^]
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
Hello everyone,
I am posting this here because I am not receiving an error to my compiling. The program executes just fine, just not applying the new computer name. Please tell me what you see wrong. I am new and been reading on MSDN's website on how to used this Function correctly.
If you have an answer to my question, please explain your answer. It will help me and any other beginner programmer.
Here is the code:
<code>#include <iostream>
#include <windows.h>
#include <stdio.h>
using namespace std;
// Set Local Computer Name
BOOL WINAPI SetComputerName(
LPCTSTR lpnewcomputername
);
int main()
{
return 0;
}
|
|
|
|
|
The computer will do everything you ask it to do; it starts at the first line of your main() function and continues until either a return, an exit() or a fatal error is encountered. You should be able to figure it out from there.
|
|
|
|
|
I thought that if I placed the SetComputerName function in
int main()
That it would be considerd a nested function? And I thought Nested functions are not allowed in int main()?
I am confused on this.
I feel very stupid for this as well.
|
|
|
|
|
Hi,
I can conclude that you are a beginner and this is your first attempt at any programming language.
Hence my advice: go to the book store, look at some books, buy the one book that looks most interesting, and study it; in one or two weeks it will teach you all the basics in a systematic way; and you will learn much more than you can discover by yourself, by experimenting and asking random questions.
|
|
|
|
|
Thank you for the advice. I will do so when I get back from Iraq. : \
Now I ran back to my room to try and re-compile this and I changed it to the following:
I still do not recieve any errors. Yet after I reboot the computer name is still the same. I am doing my best to understand.
<br />
#include <iostream><br />
#include <windows.h><br />
#include <stdio.h><br />
using namespace std;<br />
<br />
<br />
<br />
<br />
int main()<br />
{<br />
BOOL WINAPI SetComputerName(<br />
LPCTSTR lpnewcomputername); <br />
}<br />
<br />
|
|
|
|
|
Hi,
I do not plan on writing a C tutorial, however there are three things to functions:
1.
you can declare them, i.e. explain how they look, what their parameters and result are.
That is what int square(int val); does.
Declaring a function is not always necessary.
2.
you can define them, i.e. provide an implementation, that is code that actually does the job.
example: int square(int val) { return val*val; } Note the brackets.
Defining a function is necessary, unless you have a library (i.e. a collection of function definitions somewhere).
3.
you can call them, i.e. cause them to be executed.
example: c = square(123);
If you need more, for starters look for a tutorial on the web.
A simple google will find many, such as this one[^]
|
|
|
|
|
thank you very much for your help.
I am reading the tutorial now ^^
|
|
|
|