|
Hi !
Before use any command from NetApi32.DLL ( NetAPIFreeBuffer and all that stuff), I check if the version is not 95/98, .... but anyway if I try to run the EXE in a machine with 95/98 it gives me an error ( I think when tries to load the DLL or... ? I´m not sure).
Is there anyway to avoid that ? ( If I can run the program in 98 the specific NT functions never will be executed, because of the checking...).
Thanks, Bye !
Braulio
|
|
|
|
|
Use DelayLoad feature or explicitly call LoadLibrary/GetProcAddress.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
|
Hi,
I've experienced the strangest behaviour of my VS 6.0. I have project with multiple, hierarchially dependent sub-projects (each one comprising a dll). I added some code to a header file of the most basic sub-project and compiled it. The compilation went fine, VS went into linking, I heard a beep and the compilation froze! I tried to shut down VS but was told that I had to stop the compilation first, but stopping it from the menu or the button didn't have any effect. I eventually had to cold-boot my Win95 system. I removed the coded I had added, and it went fine. I added it again and compilation went fine. I made some other (very small) changes, it crashed on compilation again!
Does this ring a bell for anybody? Any suggestions?
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Are you running Norton AntiVirus on 9x/Me by chance? There's a known bug with NAV 2000/2001 (maybe 2002, I haven't tried it yet) that'll lock VC when it either runs the help compiler or regsvr32. Disable Auto-Protect to work around this.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
Wow, thanks! Yes, I'm running NAV on Win95, with autoprotect on. I'll try to disable it and see if the problem goes away. BTW, VC doesn't really lock, it just never finishes the build (but the UI works fine).
Do you know if NAV causes any problems with Adaptec CD Creator as well? Creator won't recognize my CD writer (although Direct CD works fine!)
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi,
disabling Auto-Protect certainly did the trick, thanks again. However, the compilation froze (with Auto-Protect on) either during the creation of the browse database or during invocation of a post-linking step (a file copy). So this bug is not just when running help compiler or regsvr32.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Yeah, the IDE will hang when launching any external program. Regsvr32 is just what most people get the hang with since that's used so often.
As for your CD writer, I don't know. Check Symantec's knowledge base and Adaptec's site.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
As for your CD writer, I don't know. Check Symantec's knowledge base and Adaptec's site.
Did that. Since the Adaptec sw came with the writer it's OEM and out of Adaptecs (actually it's Roxios) hands. I'll have to contact the writer producer (Samsung). But I'll upgrade my PC and install win98 instead one of these days, and I'll install NAV as the very last program. I'll check that everything works before NAV, and if anything breaks after NAV I'll fry their support.
thanks for your help
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
How to get the file property dialog box?
Like "File-->Property" in IE and Word.
Thanks.
Maer
|
|
|
|
|
I'm not sure, but you may use ShellExecuteEx() with a special Verb.
I don't know which one though, you may have to do some research.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I use the following statement to show the property of a file. But it does not work.
ShellExecute(AfxGetApp()->GetMainWnd()->m_hWnd,"properties","c:\\autoexec.bat",NULL,NULL,SW_SHOWDEFAULT);
How to resolve the trouble?
Thanks.
Maer
|
|
|
|
|
Try with ShellExecuteEx and SEE_MASK_INVOKEIDLIST .
Just a guess, though, I never tried
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I had tried the following codes, but it still does not work.
SHELLEXECUTEINFO info;
info.cbSize=sizeof(SHELLEXECUTEINFO);
info.lpFile="c:";
info.lpVerb="properties";
info.fMask=SEE_MASK_INVOKEIDLIST;
info.hwnd=this->m_hWnd;
ShellExecuteEx(&info);
Can you help?
Thanks again.
|
|
|
|
|
From PJ Naughter's CFileTreeCtrl class:
BOOL CTreeFileCtrl::ShowProperties(HTREEITEM hItem)
{
BOOL bSuccess = FALSE;
if (m_bAllowProperties && hItem)
{
CString sFile = ItemToPath(hItem);
SHELLEXECUTEINFO sei;
ZeroMemory(&sei,sizeof(sei));
sei.cbSize = sizeof(sei);
sei.hwnd = AfxGetMainWnd()->GetSafeHwnd();
sei.nShow = SW_SHOW;
sei.lpFile = sFile.GetBuffer(sFile.GetLength());
sei.lpVerb = _T("properties");
sei.fMask = SEE_MASK_INVOKEIDLIST;
bSuccess = ShellExecuteEx(&sei);
sFile.ReleaseBuffer();
}
return bSuccess;
}
So you can blame him if that doesn't work
Just replace ItemToPath() with your filename.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi Paolo
Your method works perfectly! It helps me a lot. : )
Thanks again.
Best regards.
Maer
|
|
|
|
|
How can make my window as "Always on top"?
I mean My Window is always on top of other applications, If other application is activated.
This type of thing happens in the Help also.
I hope you can understand. What my Question (I HOPE)
I know my english is bad.
Thanks in Advance -
|
|
|
|
|
You can create a windows use CreateWindowEx() function and use WS_EX_TOPMOST style. For example:
HWND hWnd;
hWnd=CreateWindowEx(
WS_EX_TOPMOST,
...,// class name
...,// window name
WS_OVERLAPPEDWINDOW,
...);
Law is meaningless without chaos.
Chaos without Law is equal to destruction.
Chaos and Law create our rich and colorful world.
|
|
|
|
|
See the VC forum FAQ.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
I need some help ... actually just to be pointed in the right direction, since I haven't dealt with this before.
I have a device that sends data out an RS-232 serial port, but it also sends data to an Ethernet port. The serial port data is handled by a separate device, but now I want the "controller" PC to read the data from the Ethernet port. Both the data-sending device and the PC have been set up with IP addresses in the same domain, and other 3rd party software reads and displays the data, so I know the PC is connected properly. Only these 2 devices are connected, so there is no other network connectivity.
So, a few questions:
- What kind of functions do I use to read data from the Ethernet Port?
- Does the data come as a serial byte stream, or is it in packets? Do I have to do my own message parsing and header-byte syncing, and then extract message data of interest?
- How do I need to "open," or "initialize" the port?
- How does all this work?
CodeProject articles, a web site, the name of a couple of functions that I can track down in the documentation, etc, is all I'm looking for right now. I haven't had much luck so far in tracking down just what I need.
Thanks,
Dave
|
|
|
|
|
I think you need to look at Sockets. Try searching MSDN for Socket API.
Hope this helps,
Michael
|
|
|
|
|
When I stretch the OpenGL MFC window past a certain point, my OpenGL rendered scene gets a black border. The border tends to grow as I increase the client area of the window. The bug happens most of the time, not always. Any ideas?
|
|
|
|
|
This is happaned only if you use combination of MS software render and Windows 2000. This can be fixed with some tricky changes of Windows's size.
|
|
|
|
|
Can anyone give me some pointers on how I would send the data I receive in a CWnd Overloaded function to another window using SendMessage.
For example
void CMyWnd::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
{
CWnd::OnKeyUp(nChar, nRepCnt, nFlags);
::SendMessage(m_hWndTarget, WM_KEYUP, ...)
}
How is this done
James Spibey
|
|
|
|
|
It depends on the message. In this case WM_KEYUP looks like this:
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_KEYUP
WPARAM wParam, // virtual-key code
LPARAM lParam // key data
);
So you would send it as ::SendMessage(m_hWndTarget, WM_KEYUP, (WPARAM)nChar, (LPARAM) nRepCnt | nFlags);
I *think* that is right, basically you need to make sure you send on the data in the format expected by the message, the info you want will always have come into the message handler at the top.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|