|
UpdateData works on modeless dialogs (and property pages). You probably have removed a control associated to a variable...
|
|
|
|
|
Hi,
Is there some document or thing that explains how to build an Ms Project Add-in using Visual C++ 6.0 ?
Bye
Braulio
|
|
|
|
|
Yes! Search codeproject & assciated web sights.
INTP
|
|
|
|
|
How to Convert the Gerber Files into Enhanced MetaFIles?
dadsadasd
|
|
|
|
|
hello my question is i am trying to make this little project to when i click on a button it will make a web page or text document load up i am still a bit new to C++ so i am not realy sure about how to go about this
any help will be very appriciated
thanks
nate
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
There you go :
strFileName can be of any file type. The right exe will be launched according to the extension.
<br />
HINSTANCE nResult = ::ShellExecute(NULL,_T("open"),strFileName,NULL,NULL, SW_SHOW );<br />
if ( (int) nResult < 32 )<br />
{<br />
AfxMessageBox(_T("Cannot open file");<br />
}<br />
|
|
|
|
|
perfect thank you so much
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
I am tring to create a groupbox on the client window
in a wtl project. I can not get it to work, it creates
a window the right size but does not paint the text
or the group outline. I have created buttons and checkboxes
and all work fine painting and all.
Here is the code for the groupbox I am tring to create.
hWndGroup = ::CreateWindow(WC_STATIC, _T("Check Item(s) to Disable."),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_LEFTTEXT | BS_TEXT,
70, 50, 200, 130, m_hWnd, (HMENU)ID_GROUPBOX,
((LPCREATESTRUCT)lParam)->hInstance, NULL);
Thank You
Bo Hunter
|
|
|
|
|
hWnd = CreateWindow (WC_STATIC,_T("Check Item(s) to Disable."),WS_CHILD |..., 0, 0, width, 30+gHeight + WINDOWHEIGHT, NULL, NULL, ghInst, tData);
Best Wishes,
ez_way
|
|
|
|
|
Try WC_BUTTON for the window class.
Best regards
Oliver
|
|
|
|
|
Hi,
I would like to change the proxy settings of IE for dial-up connection. In INTERNET_PER_CONN_OPTION_LIST structure how do I specify the type of connection ? If I specify the connection type as NULL it modifies the global settings. But, I would like to change for dial-up.
-Thanks
Sudha
|
|
|
|
|
I have no idea if this will help! I just did a quick seach of MSDN (for "dial up) and found "Dialing Up the Internet with RAS".
INTP
|
|
|
|
|
The following snippet does what you want, I guess:
char szConnection[]=...;
char szProxy[]=...;
INTERNET_PER_CONN_OPTION_LIST List;
INTERNET_PER_CONN_OPTION Option[1];
unsigned long nSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
Option[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
Option[0].Value.pszValue = (LPSTR)szProxy;
List.dwSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
List.pszConnection = (LPSTR)szConnection;
List.dwOptionCount = 1;
List.dwOptionError = 0;
List.pOptions = Option;
InternetSetOption(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &List, nSize); The proxy is set for all protocols within the connection (HTTP, FTP, etc.) Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I need to understand Net Bios Names please.
A static NetBIOS name mapping consists of a NetBIOS name from 1 - 15 characters, a name type from 0 - 255, and a corresponding IP address. TAS resolves a NetBIOS name by first searching the list of static NetBIOS names and, failing that, broadcasting a query for the desired name. Augment name resolution to effectively cross routers by using the Enterprise Name Service or Windows Internet Naming Service.
Best Wishes,
ez_way
|
|
|
|
|
Hi
Look at this
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_TCPIP_und_nr_NetBIOS.htm
and
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q163/4/09.asp&NoWebContent=1
It will say the story.
Best Regards,
A.Ilamparithi
|
|
|
|
|
Thanks will seek the url's now!
Here what I have so far from an article in 1995 for the last two digit sufix.
Thanks again
Name Number(h) Type Usage
--------------------------------------------------------------------------
<computername> 00 U Workstation Service
<computername> 01 U Messenger Service
<\\--__MSBROWSE__> 01 G Master Browser
<computername> 03 U Messenger Service
<computername> 06 U RAS Server Service
<computername> 1F U NetDDE Service
<computername> 20 U File Server Service
<computername> 21 U RAS Client Service
<computername> 22 U Microsoft Exchange Interchange(MSMail
Connector)
<computername> 23 U Microsoft Exchange Store
<computername> 24 U Microsoft Exchange Directory
<computername> 30 U Modem Sharing Server Service
<computername> 31 U Modem Sharing Client Service
<computername> 43 U SMS Clients Remote Control
<computername> 44 U SMS Administrators Remote Control
Tool
<computername> 45 U SMS Clients Remote Chat
<computername> 46 U SMS Clients Remote Transfer
<computername> 4C U DEC Pathworks TCPIP service on
Windows NT
<computername> 42 U mccaffee anti-virus
<computername> 52 U DEC Pathworks TCPIP service on
Windows NT
<computername> 87 U Microsoft Exchange MTA
<computername> 6A U Microsoft Exchange IMC
<computername> BE U Network Monitor Agent
<computername> BF U Network Monitor Application
<username> 03 U Messenger Service
<domain> 00 G Domain Name
<domain> 1B U Domain Master Browser
<domain> 1C G Domain Controllers
<domain> 1D U Master Browser
<domain> 1E G Browser Service Elections
<inet~services> 1C G IIS
<is~computer name=""> 00 U IIS
<computername> [2B] U Lotus Notes Server Service
IRISMULTICAST [2F] G Lotus Notes
IRISNAMESERVER [33] G Lotus Notes
Forte_$ND800ZA [20] U DCA IrmaLan Gateway Server Service
Best Wishes,
ez_way
|
|
|
|
|
Good information now may I ask a few question please.
In the following URL
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_TCPIP_und_nr_NetBIOS.htm
I found in part the following>
Gateway Server Service
Computers running Windows 2000 are B-node by default and become H-node when they are configured with a WINS server. Windows 2000 can also use a local database file called Lmhosts to resolve remote NetBIOS names. The Lmhosts file is stored in the systemroot\System32\Drivers\Etc folder. For more information, see TCP/IP database files
I am running XP Home and have found the following information.
Under windows/system32/drivers/etc
file name type
host file
host.ics ics file
imhost.sam sam
networks file
quotes file
services file
protocols file
I am not using wins server so I might assume I am running in B-Mode.
How does one know which mode one is running in?
How does one retrieve the type of protocol any computer might be running?
How do I retrieve the netbios name for any computer.
Once this is done may I get the MAC address by polling with the netbios name?
Best Wishes,
ez_way
|
|
|
|
|
Hi,
Have a look at this site...
http://www.inetcat.org/software/nbtscan.html
I think it will answer ur questions.
Best Regards,
A.Ilamparithi
|
|
|
|
|
Will using UuidCreateSequential_t return the correct MAC address?
GUID uuid;
typedef RPC_STATUS (CALLBACK* UuidCreateSequential_t)(UUID*);
|
|
|
|
|
hi check this one out....
// GetMACUuid.cpp : Defines the entry point for the console application.
//
// Author: Khalid Shaikh [Shake@ShakeNet.com]
// Date: April 5th, 2002
//
// This program fetches the MAC address of the localhost by creating a UUID
// and obtaining the IP address through that
//
// Prewindows 2000 one should replace the function below
// UuidCreateSequential with UuidCreate
// Microsoft decided that it was not wise to put the MAC address in the UUID
// hence changed the algorithm in Windows 2000 and later to not include it.
//
// Supported in Windows NT/2000/XP
// Supported in Windows 95/98/Me
//
// Supports single NIC card.
#include "stdafx.h"
#include <windows.h>
#include <rpc.h>
#include <rpcdce.h>
#pragma comment(lib, "rpcrt4.lib")
// Prints the MAC address stored in a 6 byte array to stdout
static void PrintMACaddress(unsigned char MACData[])
{
printf("MAC Address: %02X-%02X-%02X-%02X-%02X-%02X\n",
MACData[0], MACData[1], MACData[2], MACData[3], MACData[4], MACData[5]);
}
// Fetches the MAC address and prints it
static void GetMACaddress(void)
{
unsigned char MACData[6];
UUID uuid;
UuidCreateSequential( &uuid ); // Ask OS to create UUID
for (int i=2; i<8; i++) // Bytes 2 through 7 inclusive are MAC address
MACData[i - 2] = uuid.Data4[i];
PrintMACaddress(MACData); // Print MAC address
}
int _tmain(int argc, _TCHAR* argv[])
{
GetMACaddress(); // Obtain MAC address of adapters
return 0;
}
Best Regards,
A.Ilamparithi
|
|
|
|
|
I'm not sure exactly what you're trying to accomplish but I'm familiar with NetBios names. It sounds like you're overcomplicating it! But isn't that usually the case?
A Netbios name is basically just the short name of a computer, whereas the DNS name includes the short name plus the domain suffix's. For example, if your computer name is BOB and you're in the Microsoft domain, then your Netbios name is "BOB" and your fully qualified DNS hostname would be bob.microsoft.com.
If you go to a command prompt and enter "hostname", it will return your NetBios name. You can use "nbtstat -c" to view a list of Netbios names that are in your local cache. Throw a "/?" switch to see how to refresh, clear, and reload your Netbios cache. When a computer starts up, it will typically attempt to fill your cache with netbios names that is needed to map drives, log into domains, run login scripts, locate exchange servers on the LAN etc., first through your local cache (LMHOST), then WINS (which is nothing more than a Netbios to IP name resolver), router tables if they're set up for it, and then by broadcasting. This is how networks are usually set up by default and where the node types come into play. You can modify the node type (broadcast, hybrid, etc.) to tell your computer in which order you'd like to resolve Netbios names and/or whether or not you want to use those various methods of resolution.
As long as DNS is set up properly, there should be no need to modify the LMHOST file on a workstation. The only time you should need to modify this file is in cases between two domain controllers where you've established a trust relationship, or for "tricking" a workstation into locating specific domain controllers for authentication to an NT domain (or Active Directory" by hardcoding it into the local cache for purposes of load balancing. Or if WINS is hosed, or your router tables are refreshing too quickly, etc., but again, on a well-planned network, you shouldn't need to make adjustments to the LMHOST file and doing so can result in an maintenance nightmare for network administrators. They'll sometimes use this file to get someone connected to a network resource as a quick-fix, rather than correcting the source of the problem, which will usually lead to even more problems later.
Hope that helps. If I can answer anything more specific, let me know.
Cheers,
Don
|
|
|
|
|
Wow! Great information! Thank is just what I needed. Microsoft White Paper 1999 shows that you must pad the NetBiosName to length of 20 excluding a \0
Show I ran nbtstat -n on my new HP and it returned the following.
Local Area Connection:
Node IpAddress: [68.116.126.8] Scope Id: []
NetBIOS Local Name Table
Name Type Status
---------------------------------------------
HP2003 <00> UNIQUE Registered
HP2003 <20> UNIQUE Registered
WORKGROUP <00> GROUP Registered
WORKGROUP <1E> GROUP Registered
WORKGROUP <1D> UNIQUE Registered
..__MSBROWSE__.<01> GROUP Registered
So what is the proper way to obtain the MAC address of a system?
may I get the MAC address by?:
In the fine codeproject article "Get MAC Address" by Ryszard Krakowiak http://www.codeproject.com/internet/getmac.asp?target=MAC
shows in part:
typedef struct _ASTAT_
{
ADAPTER_STATUS adapt;
NAME_BUFFER NameBuff[30];
} ASTAT, * PASTAT;
CString GetMacAddress(CString sNetBiosName)
{
ASTAT Adapter;
NCB ncb;
UCHAR uRetCode;
memset(&ncb, 0, sizeof(ncb));
ncb.ncb_command = NCBRESET;
ncb.ncb_lana_num = 0;
uRetCode = Netbios(&ncb);
memset(&ncb, 0, sizeof(ncb));
ncb.ncb_command = NCBASTAT;
ncb.ncb_lana_num = 0;
sNetBiosName.MakeUpper();
FillMemory(ncb.ncb_callname, NCBNAMSZ - 1, 0x20);
strcpy((char *)ncb.ncb_callname, (LPCTSTR) sNetBiosName);
ncb.ncb_callname[sNetBiosName.GetLength()] = 0x20;
ncb.ncb_callname[NCBNAMSZ] = 0x0;
ncb.ncb_buffer = (unsigned char *) &Adapter;
ncb.ncb_length = sizeof(Adapter);
uRetCode = Netbios(&ncb);
CString sMacAddress;
if (uRetCode == 0)
{
sMacAddress.Format(_T("%02x%02x%02x%02x%02x%02x"),
Adapter.adapt.adapter_address[0],
Adapter.adapt.adapter_address[1],
Adapter.adapt.adapter_address[2],
Adapter.adapt.adapter_address[3],
Adapter.adapt.adapter_address[4],
Adapter.adapt.adapter_address[5]);
}
return sMacAddress;
}
where another fine article uses the GUID for obtaining the MAC address.
CString CTinyMacDlg::TryMac()
{
CString strReturn;
GUID uuid;
// In Win2k or higher, CoCreateGuid no longer returns a mac address, but UuidCreate
// Sequential does.
typedef RPC_STATUS (CALLBACK* UuidCreateSequential_t)(UUID*);
// This doesn't exist Pre win2k,
// in that case it uses CoCreateGuid (which will fail in 2k+) - mc
HMODULE hRpcrt4 = LoadLibrary("rpcrt4.dll"); // Attempt to load RPCRT4.DLL
if(hRpcrt4)
{
UuidCreateSequential_t fpUuidCreateSequential;
fpUuidCreateSequential = (UuidCreateSequential_t)
GetProcAddress(hRpcrt4, "UuidCreateSequential");
// Attempt dynamic load of UuidCreateSequential c
if(fpUuidCreateSequential)
{
// Create Sequential UUID for determination of MAC Address
fpUuidCreateSequential(&uuid);
}
else
{ // OS Doesn't support UuidCreateSequential, so fall back on CoCreateGuid
CoCreateGuid(&uuid);
}
FreeLibrary(hRpcrt4);
}
else
{ // OS Doesn't support UuidCreateSequential, so fall back on CoCreateGuid
CoCreateGuid(&uuid);
}
// Now Format The adapter address - mc
strReturn.Format("%2.2X-%2.2X-%2.2X-%2.2X-%2.2X-%2.2X",
uuid.Data4[2],
uuid.Data4[3],
uuid.Data4[4],
uuid.Data4[5],
uuid.Data4[6],
uuid.Data4[7]);
return strReturn;
}
My next question is which is thr proper way or is there another way?
Thank you so very much for your thoughful response.
Marty
Best Wishes,
ez_way
|
|
|
|
|
Are you trying to do this programmatically or do you just want to find out the MAC address of your network adapter? I haven't done this programmatically but the first one looks like the best solution, which was basically just copied from this Microsoft link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_8d82.asp[^]
Note that a MAC address is specific to a network adapter and not the system itself, so if you have more than one NIC, you'll have more than one MAC address, so you'll want to make sure that you're obtaining the correct one and it could change should someone replace the NIC.
If you're just looking for a MAC address on your computer, from a command prompt, type "ipconfig /all" and it will list information for all of your NIC's. The MAC address is the "Physical Address".
Cheers,
Don
|
|
|
|
|
Ok great I am trying to do it programmatically so I will continue with your great advice.
Thanks for helping me, I thank you so much!
Marty
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|
|
By using CreateProcess, I can invoke a new application, and get the process id for the newly created process, but how can I get the handle of the application's main window?
Thanks!!!
|
|
|
|
|