|
Hi friends,
I want to know how a Network Management Product gets the details of all the machines in a network. Even the SNMP agent is disabled still it is able to learn about the product and give it's complete details of client computers (like description,mac and os etc). How is that possible?? Anybody got some clues??
Suggest me.
Regards
Satya
|
|
|
|
|
Probably uses NetBios calls. See Netbios in the doc for more info.
onwards and upwards...
|
|
|
|
|
Or the NetServerEnum function.
onwards and upwards...
|
|
|
|
|
Anyone know how to convert a CString into LPDISPATCH and back? I'm trying to integrate with a VB program that takes an LPDISPATCH which I have as a CString. Any other ideas on how to get the job done are very welcome!!
ed
|
|
|
|
|
I don't get your situation. LPDISPATCH is an IDispatch* , in other words, a pointer. There is no useful conversion between a pointer and a string, unless you want to know the address held in the pointer.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
I'm not sure I 'get' my situation either!
The program I'm writing the plugin for is in VB. I've generated a class from their dll derived from COleDispatchDriver. I'm getting an XML response from a server which I'll parse to get a report and rather than saving it out to disk the client wants the results stored in their system. Here is the signature:
long SaveDataStream(LPCTSTR strJobID, LPCTSTR strKey, LPDISPATCH inStream, BOOL * blnPublic)
I'm using MFC. Their documents say an ADO Stream object however they said it would read any stream but I'm not sure about what they mean by stream.
Thanks!!
ed
|
|
|
|
|
Hi,
How can I verify if SP 5 is installed with Visual C++ 6 ?
Thanks,
Claude
|
|
|
|
|
check this registry location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\ServicePacks
There you should see a string value sp5 REG_SZ.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
when i trace the following code,the value of "size" is alwarys 4 instead of 14,
why?
int size;
char *str;
str = (char*)malloc(128);
sprintf(str,"string1\
string2")
size = sizeof(str);
gucy
|
|
|
|
|
First of all, you know you're using C, not C++, right ?
4 is the size of a 32 bit number, i.e. the number which stores the memory address where your string lives. You're looking for strlen, I believe. Or use C++ instead, for example std::string or CString if you're using MFC ( or ATL in VC7, I believe ).
Of course, if you're learning, it is indeed better that you understand what the string classes do for you, but sizeof is the wrong approach, it's strlen you want.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
The sizeof keyword gives the amount of storage, in bytes, associated with a variable or a type. Which means that in your case your are getting the size of str which is nothing but a pointer. A pointer stores a memory location, which is only 4 bytes. If you truly want to get the size in bytes of your string that you should try this:
size = sizeof(char) * strlen(str)
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
Hi,
We create a Trial.txt & a Trial.mdb (using FTP to transfer) and put them on our Web-Page (\database\...). We are able to use VC++ 6.0 to link to our Web Page & read the Trial.txt by the following codes:
<br />
pConnect = pInetSession->GetFtpConnection (strServerName, "xxxxxxxx", "pppppppp", nPort, FALSE);<br />
<br />
pFile = pConnect->OpenFile ("Database/Trial.txt",.......);<br />
<br />
pFile->Read (str, 100 ,...)<br />
*) The problem is: I do not know what command to open the Trial.mdb ... does anyone show me how to do it?
Many thanks
Anh
|
|
|
|
|
Hello again!
How can each button have its own width like on the IE toolbar? I added some text to my buttons and they all take their width from the widest button...
Thanks!
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
Use the BTNS_AUTOSIZE style - when a button has that style, it resizes itself to be just wide enough for the icon+text.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
This what I have :
if(!m_wndToolBar.CreateEx(this,
TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_AUTOSIZE,
WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS )
|| !m_wndToolBar.LoadToolBar(IDR_MAINTOOLBAR))
{
TRACE0("Failed to Create Dialog Toolbar\n");
EndDialog(IDCANCEL);
}
TBSTYLE_AUTOSIZE is the same as BTNS_AUTOSIZE.
The buttons still have the same width Why?
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
|
My program uses SHFileOperation to copy, move, rename, and delete hundreds of files. For most people, doing those steps to ~400 files takes under 15 seconds, but for some people it takes a LOT longer:
<br />
-----------------------------------------------------------------<br />
Timings at 08:11:20 Thursday, June 19, 2003<br />
-----------------------------------------------------------------<br />
CModScript::Activate took 688.45 seconds (called 2 times)<br />
SHRenameFile took 225.50 seconds (called 225 times)<br />
SHCopyFile took 461.89 seconds (called 461 times)<br />
SHCopyFile_SHFileOperation took 461.78 seconds (called 461 times)<br />
SHMoveFile took 2.00 seconds (called 2 times)<br />
Notice a pattern? Each operation takes EXACTLY 1.0 second! Another user having that problem had the exact same results, too, with SHDeleteFile also taking exactly 1.0 second per call. It isn't the users' computers' fault, either; they have similar specs to those having fast, normal times.
What could the problem be? This is a very confusing and unusual The only thing I can think of to fix the problem is to try using the Win32 CopyFile function, but that'd just avoid the problem and not solve it.
|
|
|
|
|
Like topic says, I'm looking for some tips to do this, like you can see in IE for it's toolbar buttons...
Thanks!
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
You can have text beside the icons if you use the TBSTYLE_FLAT|TBSTYLE_LIST style flags
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
That was easy... I was using Create instead of CreateEx so that's why I wasn't able to do it!
Thanks!
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
hello
i want to link my application with one kind of file (*.dsw or *.cpp).
i want when i click on the files that i have tell above my application run.
|
|
|
|
|
|
Why doesn't this do what I want:
cout << L"Hello world";
This prints out the address of the string, because it interprets it as a void*. Is there not an overload for WCHAR*?
|
|
|
|
|
Try
wcout << L"Hello world";
|
|
|
|
|
Aaaaahhhhhh... there's a wcout! It's funny, because the AppWizard (at least in VC6) generates this for a default console app:
cerr << _T("Fatal Error: MFC initialization failed") << endl;
which if compiled with UNICODE, would print out the address of the string.
I guess I'll have to do something like
<br />
#ifdef UNICODE<br />
#define _tcout wcout<br />
#else<br />
#define _tcout cout<br />
#endif<br />
in order to have some kind of "tchar-ish" macro, 'cause I can't find one already defined.
|
|
|
|