|
Still doesn't working...thank you for your effort, but please help me one more time .. I'm gona crazy wit this...
This is part of my code. As you may see that I include Sensapi.h, and in properties of application I include library SensAPI.Lib (/IMPLIB:"SensAPI.Lib").
Do you have any earthly Idea what might be wrong with this ?
#include "stdafx.h"
#include "MYPRG.h"
#include "MYPRGDlg.h"
#include "Sensapi.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
......
BOOL MYPRGApp::InitInstance()
{
...
QOCINFO oci;
oci.dwSize = sizeof(QOCINFO);
IsDestinationReachable("www.google.com", &oci);
....
|
|
|
|
|
So you have "sensapi.lib" in the Object/library modules: box on the Link tab of the Project Settings dialog?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
So where is the /IMPLIB operative being used?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Sorry...misunderstanding
From options you may see that /IMPLIB:"Sensapi.lib" is there.
/OUT:"Debug/MYPRG.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/MYPRG.pdb" /SUBSYSTEM:WINDOWS
/IMPLIB:"Sensapi.lib" /MACHINE:IX86
I also try to include Sensapi.DLL file in this .cpp source, but still get same error.
Do you think that I have to configure, or setup, or.... I don't know what else should I and where to...
Should I put #include "Sensapi.h" directive on some particula place, should I include this library somwhere else except this (MYPROG Property Pages --> Configuration Properties --> Linker --> Advanced --> Import Library --> Sensapi.lib) ?
I try to find some source code (or project file) that use this function on Internet, but it wasn't successfully.
Do you have any other idea what might be wrong ?
|
|
|
|
|
/IMPLIB is for telling the linker to generate an import library with that name, based on the exports from your binary.
To use an import library, you include it in the list of files to link. In the Visual Studio .NET IDE, this is found under Configuration Properties > Linker > Input > Additional Dependencies.
If you've already been using /IMPLIB , your output directory will likely contain a file sensapi.lib , which could cause the linker to pick that file. If so, delete it.
|
|
|
|
|
Thank you !!!!!!!!!!!!!!!!!!!!!!!
It's working !!!
I can't believe it !!!!
Thank you !!!
|
|
|
|
|
Interesting thing is that, if I omit the Sensapi.lib, I get the same error as I get it with included library ?!
|
|
|
|
|
According to the documentation[^], the import library for IsDestinationReachable is sensapi.lib .
Have you perhaps changed configurations (e.g. from Debug to Release) and only included that library in the Link tab for one of them?
|
|
|
|
|
I want to change the internet option by my program, but I don't know which file the option is saved in. I didn't find it in registry file.
Does anyone have any good idea to solve this problem? I'll appreciate anyone know it reply my question.
|
|
|
|
|
Which option are you interested in changing?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I want to change the option in Secruit->ActiveX control and Plug-ins
|
|
|
|
|
First place to look would be in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\SO\ACTIVE_CONTENT. After that, you might need to employ Internet Explorer automation.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thank you so much. But I just wonder why I didn't find in the registry.
|
|
|
|
|
ray_li wrote:
But I just wonder why I didn't find ??? in the registry.
Why you didn't find what?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I was ebla to open the file, but I have trouble getting data.
My file looks like this:
account amount pendamount
123456 231.00 78.00
I need to read the data into variable account and amount then use get() again with no argument in order to through away the new line character at the end of the line .
Thanks
|
|
|
|
|
Anonymous wrote:
...but I have trouble getting data.
Show us the code you are using.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
char c;
while (inpf.get(c)) {
cout.put(c);
}
the second version:
inpf.seekg(ios::beg);
static char read_array[10]; inpf.read(read_array,15);
|
|
|
|
|
char c;
while (inpf.get(c)) {
cout.put(c);
}
|
|
|
|
|
Are you sure this is what you are using? Your original request was to "read the data into variable account and amount then use get() again with no argument in order to through away the new line character at the end of the line." What you have here is not even close. It simply reads and displays one character at a time of the file.
See if this is any closer:
string account, amount, pendamount;
while (...)
{
inpf.getline(account, 15, ' ');
inpf.getline(amount, 15, ' ');
inpf.getline(pendamount, 15, ' ');
}
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I added header <string> to support string.
My modified code:
string account, gallons;
while(!inpf.eof())
{inpf.get(account, 15, ' ');
inpf.get(gallons, 15, ' '); }
When I compile I get this error:
"'class std::basic_istream<char,struct std::char_traits<char=""> > &__thiscall std::basic_istream<char,struct std::char_traits<char=""> >::get(char *,int,char)' : cannot co
nvert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"
Any idea why? I am a new to C++
|
|
|
|
|
Anonymous wrote:
...]cannot convert parameter 1 from 'class std::basic_string,class std::allocator >' to 'char *'[...]
This is about as specific as C++ error messages get.
It means that you provided a std::string where a char* was expected. The C++ compiler had no clue how to convert the string into a char* and threw the error.
You need to give the get() -function a char -array of the length 16 (15 chars you are expecting and one for the trailing zero).
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
hi! i want to read c source code sample to diable ctrl+alt+del keys combinations in windows 2000. because i have a sample programms listed below but it does not work in windows 2000. hope to hear from u soon.
the sample programms is as :
************************************************start
#include <windows.h>
int WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR ,int)
{
BOOL old;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0);
MessageBox(NULL, "Ctrl-Alt-Del, Alt-Tab, and some other system keys are now disabled. "
"Test this for yourself by pressing some of these key combinations. "
"Note that you can still switch to other applications using the Taskbar buttons. "
"For more precise control over the system keys and task switching operation, get "
"KeyBlock from http://members.aol.com/phord (You can also find the source code to "
"this demo there.)", "Poor Man's KeyBlock demo", MB_OK);
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0);
return 0;
}
*****************************************************end
|
|
|
|
|
This is not hte first time someone ask this. Search this message board or Goggle for "gina.dll".
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Rickard Andersson18 wrote:
...Goggle for "gina.dll".
Perhaps you meant msgina.dll!
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|