|
Thanks for the link, but the SDI framework does automaticly open the "Open file..." dialog! And I am only want to change the file extension of this (automaticly called) dialog!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Edit the resource string table entry to set the file extension(s) that your app recognizes. It is probably an entry with the ID of IDR_MAINFRAME. An example is below:
ServerMon\n\nServer\nMonitor Server List (*.msl)\n.msl\nServerMon.Document\nServer Document
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I create dial up entry programmaticly using visual C++ ver 6.0
To do so I need to fill RASENTRY structure and pass it to the RasSetEntryProperties function. everything works fine but there are some extra options under windows 2000 which I want to use.
For instance I want RASENTRY.dwOptions = RASEO_SecureLocalFiles to be set and my complier doesn't know what is RASEO_SecureLocalFiles is. Does it mean that using Visual C++ 6.0 I am not able to use win 2000 parameters? or maybe I should use newer version of RasApi. If so do I have to use .Net? I am confused.
Please help
|
|
|
|
|
You can download the latest Plaform SDK. This will update your headers and libs, and it also works with VC++6.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello Friends,
I need to convert the ordinary dll(which can not be registered with regsvr32) to COM dll.Is there any tools for that
yakkalas
|
|
|
|
|
I don't think thare are any tool that can do it automatically.
It's the hard way in VC...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I have to create an application whose user interface
looks like an X-MOTIF UI.
Is it possible to do that in VC++ ?
Does some utility classes already exists ?
Thanks a lot !!!
|
|
|
|
|
Hi ...
I Think there is a windows version of the QT library for windows.
There is also a Windows Fltk version you could try.
Dont forget to look at GTK+ windows version...
|
|
|
|
|
Hi!
I`m having problems with handling messages on my automation server which is written in Visual C++.
I use a DLL that generates messages which my automation server should handle, but it doesn`t seem to respond to the messages. The automation server compiles to a DLL. I`m gonna use it from Visual Basic by using the CreateObject() function.
Do anyone know how to handle messages on an automation server? I know how to handle messages on an executable program with an user interface. I`m using MFC and message handlers.
|
|
|
|
|
how to make setup of project in a visual c++ 6.0. i am using application wizard of visual c++ 6.0 but not succeding in making a setup. give me the step by step guideline.
thanx
Reply me soon
|
|
|
|
|
|
summo wrote:
how to make setup of project in a visual c++ 6.0
I assume you've created a program in VC++ and want to distribute it using a Setup application. If so, you can use InstallShield that comes with VS 6 itself. Sorry, I haven't used InstallShield myself, so I can't tell you if it's easy or not.
If you want something else, try Ghost Installer or something. In the worst case, there's always Google.
All the best, though!
Vikram.
"There's probably a Nish-like alien answering VB questions on a CP forum as we speak." - adamUK in The Lounge, discussing aliens and parallel universes.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Hi
Does anyone know how to get the mac-address of the ethernet card by using MFC?
A little piece of code or article would be great.
and btw, i use VC5 if needed to know.
Greetings
Jens
|
|
|
|
|
There is an example here:
http://tangentsoft.net/wskfaq/examples/getmac-netbios.html
Browse the site and you will find two more examples.
|
|
|
|
|
first of all thanks for the fast respond
and i checked that site too .. seems that there are
3 solutions available:
1) NetBIOS API -> machine need to have NETBIOS installed .. not good solution
2) RPC/OLE API -> fails in alot of situations (not good neither)
3) SNMP API -> veryy complex
Isn't there just a simple SDK function available to solve this little problem?
Modified:
I tried to work with the SDK 'GetAdaptersInfo'.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/ip_interface_info.asp
But the header needed 'Ipexport.h' don't find it on my system.
Is this SDK function the one i need?
Best regards
Jens
|
|
|
|
|
I have some source code, using the QueryDosDevice, but it is quite long to send it through this forum I guess. And it is solution only for NT I guess, this will not work on win9x But anyway I can try it:
first usage and then the whole code
<br />
char adapterNames[4096];<br />
LPSTR buffer = adapterNames;<br />
<br />
if( GetAdapterNames(buffer) )<br />
{<br />
while(*buffer)<br />
{<br />
BYTE a[6];<br />
if(GetMacAddr(a, buffer))<br />
{<br />
printf(" %02.2X-%02.2X-%02.2X-%02.2X-%02.2X-%02.2X\n", a[0], a[1], a[2], a[3], a[4], a[5]);<br />
}<br />
buffer = strchr(buffer, 0) + 1;<br />
}<br />
}<br />
<br />
<br />
<br />
<br />
BOOL GetAdapterNames( LPSTR buffer )<br />
{<br />
HKEY hRoot = NULL;<br />
LPCSTR rootName = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards";<br />
<br />
DWORD ret = RegOpenKeyEx( HKEY_LOCAL_MACHINE, rootName, 0, KEY_READ, &hRoot );<br />
if( ret )<br />
return FALSE;
<br />
char keyName[50];<br />
DWORD keyNum = 0;<br />
LPCSTR valName = "ServiceName";<br />
__try<br />
{<br />
for( ; ; )<br />
{<br />
ret = RegEnumKey( hRoot, keyNum, keyName, 19 );<br />
if(ret)<br />
{<br />
if( ret == ERROR_NO_MORE_ITEMS )<br />
{<br />
*buffer = 0;<br />
return TRUE;<br />
}<br />
else<br />
{<br />
return FALSE;<br />
}<br />
}<br />
<br />
HKEY hKey = NULL;<br />
ret = RegOpenKey( hRoot, keyName, &hKey );<br />
if(ret)<br />
return FALSE;<br />
<br />
DWORD buflen = 50;<br />
ret = RegQueryValueEx( hKey, valName, NULL, NULL, (LPBYTE)buffer, &buflen );<br />
RegCloseKey( hKey );<br />
if( ret )<br />
return FALSE;<br />
<br />
buffer += buflen;<br />
keyNum++;<br />
}<br />
}<br />
__finally<br />
{<br />
RegCloseKey( hRoot );<br />
}<br />
<br />
return FALSE;<br />
};<br />
<br />
<br />
<br />
BOOL GetMacAddr(LPBYTE buffer, LPCSTR devName)<br />
{<br />
BOOL bSuccess = FALSE;<br />
char linkName[512];<br />
char deviceName[64];<br />
BOOL bCreatedDevice = FALSE;<br />
<br />
if( QueryDosDevice(devName, linkName, sizeof(linkName)) == 0 )<br />
{<br />
if( GetLastError() == ERROR_FILE_NOT_FOUND )<br />
{<br />
strcat( strcpy(deviceName, "\\Device\\"), devName );<br />
<br />
if( !DefineDosDevice(DDD_RAW_TARGET_PATH, devName, deviceName) )<br />
return FALSE;<br />
<br />
bCreatedDevice = TRUE;<br />
}<br />
else<br />
return FALSE;<br />
}<br />
<br />
char macFileName[64];<br />
strcat( strcpy(macFileName, "\\\\.\\"), devName );<br />
<br />
HANDLE hMAC = CreateFile( macFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );<br />
if( hMAC != INVALID_HANDLE_VALUE )<br />
{<br />
BYTE oidData[256];<br />
NDIS_OID oidCode = OID_802_3_CURRENT_ADDRESS;<br />
DWORD retCount;<br />
if( DeviceIoControl(hMAC, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oidCode, sizeof(oidCode), oidData, sizeof(oidData), &retCount, NULL) )<br />
{<br />
bSuccess = (retCount == 6);<br />
if( bSuccess )<br />
memcpy(buffer, oidData, 6);<br />
}<br />
}<br />
<br />
if(bCreatedDevice)<br />
{<br />
if( !DefineDosDevice(DDD_RAW_TARGET_PATH | DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, devName, deviceName) )<br />
{<br />
if( hMAC != INVALID_HANDLE_VALUE )<br />
CloseHandle( hMAC );<br />
<br />
return FALSE;<br />
}<br />
}<br />
<br />
if( hMAC != INVALID_HANDLE_VALUE )<br />
CloseHandle( hMAC );<br />
<br />
return bSuccess;<br />
}<br />
|
|
|
|
|
Thank you geo_m but i'm running win2k here. So this isn't the correct solution neither :S
But thanks for the response.
|
|
|
|
|
Eh, I allways thought that the w2k is NT based - what works for NT, works usually for w2k . Anyway this code snippet is tested on w2k extensively by our clients
|
|
|
|
|
JensB wrote:
Isn't there just a simple SDK function available to solve this little problem?
Two my knowledge there is no SDK function that can do what you want. Besides that, if there was one then why would people go through so much trouble and implement those 3 methods that you saw in the website?
JensB wrote:
But the header needed 'Ipexport.h' don't find it on my system.
I really don't know the answer to this question. Sorry.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Two my knowledge there is no SDK function that can do what you want. Besides that, if there was one then why would people go through so much trouble and implement those 3 methods that you saw in the website?
Maybe they are freakie héhé
I think they want to have a solution that runs on all OS'es.
I just found this following url:
http://www.ndis.com/faq/QA01030302.htm
There is only 1 solution that works on all os'es and that is the very complex SNMP one.
I think i'll go for the SDK function "GetAdaptersInfo". But i think i'll need to install SDK too. That i maybe will get that 'Ipexport.h' header file.
Anyway, never thought it would be that hard to do such easy retrieval.
Greetings
Jens
P.S. Debug your comment lines
|
|
|
|
|
|
Hi..
I've used CreateProcess with SW_HIDE to launch a 3rd party middleware program hidden, but now the 3rd party program has been updated and suddenly my code don't work anymore (the launched window does not hide) ?
What could be the reason for that ? I'm totally blank
My code below... (still works wih the old version & other programs)
memset(&starttype, 0, sizeof(starttype));
starttype.dwFlags = STARTF_USESHOWWINDOW;
starttype.wShowWindow = SW_HIDE;
CString appParam = m_cmp + "\\iefcm65n.exe iefcm65n startup /initfile=iefcmn.ini";
CString workdir = m_cmp;
if (CreateProcess(NULL,(LPTSTR) (LPCTSTR) appParam,NULL,NULL,FALSE,0,NULL, (LPTSTR) (LPCTSTR) workdir, &starttype, &pinfo))
{
prochandle = (long) pinfo.hProcess;
threadid = pinfo.dwThreadId;
....
|
|
|
|
|
Thomas Andersen wrote:
but now the 3rd party program has been updated and suddenly my code don't work anymore
You just answered your question - the new program is doing something to override your SW_HIDE request. This might be as simple as them calling ShowWindow() twice, where before they were calling it once. The first ShowWindow() ignores its parameter and uses the SW_HIDE value that you specify, but subsequent calls use the parameter the caller passes.
--Mike--
Mister Sparkle is disrespectful to dirt.
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Thanks...
I take it that there's no way to get past it then ?
I can't think of any, but then again I'm not that good at programming
|
|
|
|