|
Yes, you are right.
Guess I am being spontaneous.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi ,
How to get the contents of a folder from remote system in VC++ ?
The contents retrieved from the folder of remote system should be added to the listbox of our application.
Can anyone help me pls........
Raji
|
|
|
|
|
|
i want to get the contents of a shared folder of a remote system
Raji
|
|
|
|
|
The CFileFind class supports UNC so it can iterate remote folders as well as local folders. Something like:
CFileFind ff;
BOOL bFound = ff.FindFile("\\\\server\\share\\users\\davidc\\*.*");
do
{
bFound = ff.FindNextFile();
TRACE("%s\n", ff.GetFilePath());
} while (bFound != FALSE);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi ,
How to create a movable bar/line on a picture box using VC++?
Aparna
|
|
|
|
|
Look for MFC CRectTracker.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi,
I included this file in my source code and depsite this it throws error.
I am ruunng on Windows 2000 PROFESSIONAL.
Looks strange.
Psl helpme out.This is the source code available from MSDN.
//#include "windows.h" header file"
#include <windows.h>
//#include "stdio.h" header file
#include <stdio.h>
//#include "tchar.h" header file
#include <tchar.h>
//#include "iphlpapi.h" header file
#include <iphlpapi.h>
int main()
{
HRESULT hr;
IPAddr ipAddr;
ULONG pulMac[2];
ULONG ulLen;
ipAddr = inet_addr ("192.168.25.31");
memset (pulMac, 0xff, sizeof (pulMac));
ulLen = 6;
hr = SendARP (ipAddr, 0, pulMac, &ulLen);
printf ("Return %08x, length %8d\n", hr, ulLen);
size_t i, j;
char * szMac = new char[ulLen*3];
PBYTE pbHexMac = (PBYTE) pulMac;
//
// Convert the binary MAC address into human-readable
//
for (i = 0, j = 0; i < ulLen - 1; ++i) {
j += sprintf (szMac + j, "%02X:", pbHexMac[i]);
}
sprintf (szMac + j, "%02X", pbHexMac[i]);
printf ("MAC address %s\n", szMac);
delete [] szMac;
return 0;
}
after compiling:
Error :\kuttanur\macaddress\mac.cpp(5) : fatal error C1083: Cannot open include file: 'iphlpapi.h': No such file or directory
Regards
|
|
|
|
|
Have you installed the Platform SDK? If not then I recommend you install it.
If you have ensure that the appropriate path is in you include directory list. i.e. <platform sdk directory>\include
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
Ya ANTONY ,Its already installed.
I have run many window programs even
getting the list of network resourcesWhen I wrote a smll program in Win32.
All r running well excep this.
Can somebody help me out.
Regards
BlackTiger
BlackTiger007
|
|
|
|
|
If you search for iphlpapi.h on your system is it in a directory that is in your include list?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
Antony,
When I searched the file
I found it 2 locations
1. C:\Program Files\Platform SDK\Include
2. C:\Program Files\Microsodt Visual Studio.net 2003\Vc7\PlatformSDK\Include
But I am running this application using VC 6.0.
Regards
BlackTiger007
BlackTiger007
|
|
|
|
|
Antony,
The file is missing in VC 6.0 .
Whereas the same program runs very well in Visual Studio.net
Thanks Antony
Bye
|
|
|
|
|
You need to ensure that C:\Program Files\Platform SDK\Include is being searched. Go to Tools/Options and select the Directories tab. Is C:\Program Files\Platform SDK\Include in the list of Include directories?
You can also right click on the #include <iphlpapi.h> statement and select Open. If the file does not open, you know that it cannot be found.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If your application needs to dynamically change pages in Wizard mode, then purge the resizer object contents for a page when you remove it. You may need to do this, for example, if user options on your Wizard start page determines which pages are to follow. Apparently, if a page is removed and added back later, the contents held by the Resizer object are from the previous object instance, and are invalid for the new instance.
Can we dynamically change pages in Wizard mode?
Thanks,
Sean Wang
Sean Wang
|
|
|
|
|
HI,
Shellexe (..,..,,) is to execute any exe.. what is
to clsor it means exit from it
actulay i want to execute it from my code to just load its dll s and then exit from it or close it
tell me plz
|
|
|
|
|
Try CreateProcess(...) instead.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
PLZ explain ,,,,
how to i use CreatProcess .....
it replace Shellexe or wt???
i want to close that exe. that i run by shellexe().
thanx
|
|
|
|
|
What CreateProcess provides over using ShellExec is a handle to the launched executables thread id.
Using this thread id you can then close the application (using EnumThreadWindows ) at a later time.
:
EnumThreadWindows(dwThreadId, CloseCallBack, 0);
:
BOOL CALLBACK CloseCallBack(HWND hWnd, LPARAM lParam)
{
ASSERT(hWnd != NULL);
HWND hOwner;
LONG_PTR hAncestor;
hAncestor = GetWindowLongPtr(hWnd,GWL_HWNDPARENT);
hOwner = GetParent(hWnd);
if( !hOwner && !hAncestor )
{
PostMessage(hWnd, WM_CLOSE, 0, 0);
ShowWindow(hWnd,SW_RESTORE);
return false;
}
return true;
}
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
HI,
Can i access Video Camera Through COM port
if yes then HOW ?? any sample etc.
actualy firstly i access it by TV CARD and captured video....
But to start my application firtly RUN TV Card Software
and close it .. I think it loads its DLLs etc.
then i start my application it works fine..
if i not start TV Card Software after Booting System
n i start my application it not capture video from TV CARD ,,
i think firstly its DLL r need to load .. r they ???
so thats y i wana to access it by COM port/..
Plz tell me the way
Its Urgent ...... zahid_ash@hotmail.com
thanx
|
|
|
|
|
Hello
We have a toolbar in our app that has a button with the TBSTYLE_CHECK style. How can I change the colour used in the backgroud of the button when it is checked / unchecked
Thanks
Josh
|
|
|
|
|
In the toolbar's parent window (usually your main frame) handle NM_CUSTOMDRAW . The message sends along a NMTBCUSTOMDRAW struct which has a lot of members you can set to change the colors of various parts of the buttons.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
Dear friends,
I wonder if anyone knows how to add and delete rows in a MSDataGrid without using the CRecordset class or setting up connection strings.
Many thanks
|
|
|
|
|
#include <iostream.h>
#define unsafe(i) \
( (i) >= 0 ? (i) : -(i) )
inline
int safe(int i)
{
return i >= 0 ? i : -i;
}
int f() {cout << "Called f()!" << endl; return 0;};
void userCode(int x)
{
int ans;
ans = unsafe(x++);
cout << "[1] "<< x << endl;
ans = unsafe(f());
cout << "[2] "<< x << endl;
ans = safe(x++);
cout << "[3] "<< x << endl;
ans = safe(f());
cout << "[4] "<< x << endl;
}
void main(void)
{
userCode(100);
}
I was doing a test code for inline functions comparison to macros. The original code was shown as above, things seemed normal as the result showed two times of f() calls. The result looked like:
[1] 102
Called f();
Called f();
[2] 102
[3] 103
Called f();
[4] 103
However, after I tried to call <big>ans = (f()) >= 0 ? (f()) : -(f()); </big> instead of <big>ans = unsafe(f());</big> , I got a result of calling f() FOUR times instead of TWO times as supposed. In this tread, I failed to attach a image of the result, which looked like:
[1] 102
Called f();
Called f();
Called f();
Called f();
[2] 102
[3] 103
Called f();
[4] 103
I ran the program twice both of times I got calling f() FOUR times, nevertheless, I could repeat the result after I re-compiled the program again with the original code.
Could this be a compiler bug?
DJ
|
|
|
|
|