|
Christian Graus wrote:
CorvetteZ0606 wrote:
Is there a way I can create a new concept of data/code encapsulation in a header/library without completely rewriting the compiler/linker/IDE?
No.
Well maybe there should be
|
|
|
|
|
You could write your own precompiler and add it to the MSVC++ IDE via a pre-build step.
|
|
|
|
|
I need to enume the hosts of my LAN. I have tried to use WNet functions, but with little success.
Can anyone provide me a way to achieve this??
thank you very much.
|
|
|
|
|
|
xLANInfo does not work in my Computer at all. it use the WNet functions.
can you provide me another method.
thank you very much
|
|
|
|
|
|
I guess its a 9x machine over there !
suhredayan There is no spoon.
|
|
|
|
|
suhredayan® wrote:
its a 9x machine over there !
I don't know? . But I believe he is facing problem due to XP Service Pack 2. I have no knowledge about it do u?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Thank you . I download the demo, but it does not work too.
we all use Windows SP2 system.
Now i have found a way to achieve my purpose.
i send ARP request to all Local ip addresses. the ones who reply my request exit in my LAN.
|
|
|
|
|
yanping wang wrote:
I have tried to use WNet functions, but with little success.
Show us the code that is not working. What does it produce?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thank you for your reply.
The problem is that not every hosts have the ablity to enume hosts in LAN by using WNet functions. only the one which is a domain administrator have the ability.
so i think the WNet functions do not fit me.
|
|
|
|
|
now I have succefully enumed hosts of my LAN by sending ARP request.
but this require to install Ourself protocol driver to send ARP requests(SendARP does not fit).
It worked very good.
|
|
|
|
|
my demo code is here(using WNet). it can not enume hosts:
#include "../common/initsock.h"
//#include "Ws2tcpip.h"
#include <ws2spi.h>
#include <winnetwk.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
CInitSock theSock; // to call WSAStartup function
using namespace std;
#include "Iphlpapi.h"
#pragma comment(lib, "Iphlpapi.lib")
#pragma comment(lib, "Mpr.lib")
BOOL EnumRes();
void main()
{
EnumRes();
}
BOOL EnumRes()
{
HANDLE hEnum;
DWORD dw = ::WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, NULL, &hEnum);
if(dw != NO_ERROR)
{
printf(" OpenEnum failed \n");
}
DWORD cCount = -1;
u_char lpBuffer[1024*16];
DWORD cBufferSize = 1024*16;
do
{
dw = ::WNetEnumResource(hEnum, &cCount, lpBuffer, &cBufferSize);
NETRESOURCE *pRes = (NETRESOURCE *)lpBuffer;
if(dw == NO_ERROR)
{
for(int i=0; i
|
|
|
|
|
yanping wang wrote:
it can not enume hosts:
Why? Are you getting a runtime error? If so, what?
yanping wang wrote:
if(pRes[i].dwUsage == RESOURCEUSAGE_CONTAINER)
You may want to change this to:
if ((pRes[i].dwUsage & RESOURCEUSAGE_CONTAINER) == RESOURCEUSAGE_CONTAINER)
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thank you.
the change you made is right. thank you very much
|
|
|
|
|
Hi,I create a MFC externsion DLL .and I add a class to my project (based CDialog named CBmpDlg)
change the class to AFX_CLASS_EXT....
BUILDING ........ok
copy the lib and dll and .h files to my project (based CDialog)
setting->link input my lib file name
change the class to base CBmpDlg;
buiding ........ok
but when I run the programe,error!!!
see the picture (one is debug two is release)
http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=148807&forum_id=59[^]
THANK YOU!
|
|
|
|
|
chinakknd wrote:
see the picture (one is debug two is release)
Sorry, we cannot see the picture.
suhredayan There is no spoon.
|
|
|
|
|
NOW YOU CAN SEE THE PICTURE
|
|
|
|
|
|
I'm trying to develop an add-in for Outlook Express, the add-in is supposed to intercept sending mails and (optionally) add attachments to the mail being sent.
I have already done that on Microsoft Outlook using Visual Studio Tools for Office, but I couldn't find any way to do it on Outlook Express.
Help would be greatly appreciated, just point me on the way.
Thanks in advance,
Wessam Fathi
Wessam Fathi
|
|
|
|
|
Microsoft dosen't provide any documentation to do this. However keep a watch over msdn [^]. Hope they come with additional interfaces soon.
Note: I'm not trying to say your requirment is not possible.
suhredayan There is no spoon.
|
|
|
|
|
I fixed my earlier problem and found a new one that is easely fixed, but I don't like the fix. It would force useres (of the templates) to code in a way that seems unnatural.
typedef classB<classA<char>> classB_type;
typedef classA<char> classA_type;
typedef classB<classA_type> classB_type;
Why does the first version generate errors?
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
|
:-DThanks! I had forgot about that.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
John R. Shaw wrote:
Why does the first version generate errors?
Hmm... that's exactly the problem (and solution) I mentioned here
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|