|
Well yeah, I know that .... I think you meant to reply to the other guy
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Sorry for that, I did meant to reply to the other guy.
|
|
|
|
|
|
I am currently tring to include the library Netapi32.lib
|
|
|
|
|
In VC6: Go to Project, Settings, Link tab. Select the General category from the dropdown. Add NETAPI32.LIB to the Object/library modules field.
In VS.NET: Go to Project, Properties, Linker, Input. Add NETAPI32.LIB to the Additional Dependencies field.
Software Zen: delete this;
|
|
|
|
|
#pragma comment(lib, "Netapi32.lib") somewhere in your source...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I dont know if this is the right place for my Question, but i've got now solution by posting this question to many boards ;-(
I've the following situation, i'am running Windows XP with a networkcard and a 56k modem as internetconnection. there is a problem when i hangup the modem connection, the statistic counter are getting lower than before.
i can check that with "netstat -e"
This one is before i hangup my modem
Received Sent
Bytes 1602015 1158327
Unicastpakete 8346 8196
Nicht-Unicastpakete 140 118
Verworfen 0 0
Fehler 0 0
Unbekannte Protok. 0
This one is after i closed my modem connection
Received Sent
Bytes 858279 1122709
Unicastpakete 7283 7397
Nicht-Unicastpakete 144 103
Verworfen 0 0
Fehler 0 0
Unbekannte Protok. 0
Has anyone an idea? I currently make programm witch checks
this things by using GetIfEntry, but doesnt get the right
values, is this a XP bug ?
{
*pReceived += mib.dwInOctets;
*pSent += mib.dwOutOctets;
}
http://www.pmasoft.net/englisch/onlineeye_prof.htm
Thank You
|
|
|
|
|
I'm playing video with IGraphBuilder interface. But i want to draw on this video (client area of ActiveX wnd [IVideoWindow]) some GDI objects ( line, circle, text) - only playing, stepping, pausing.It may be done with filters, but i don't know, plzplzplz help
thnx
J.
|
|
|
|
|
DirectShow ==
But yeah, it can be done with a filter. Take a look at the EZRGB24 sample that comes with the SDK. It would have to be modified quite a bit, but it could be done.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
|
With help of this forum (thanks to good peaople) I learned how to use MSLU with MFC apps (http://www.trigeminal.com/usenet/usenet.asp?1033)
The only thing I need to do to complete my task is to override OleUIPasteSpecialW, changing properly some members of LPOLEUIPASTESPECIALW structure, making LPOLEUIPASTESPECIALA from it and then calling OleUIPasteSpecialA. The problem is in displayng FormatName(s) in listbox. How to get them to translate from Unicode to ANSI using WideCharToMultiByte?
All this required to let the OLE stuff to work correctly in MFC apps in Edit menu->Paste Special.
|
|
|
|
|
Valera241176 wrote:
How to get them to translate from Unicode to ANSI using WideCharToMultiByte?
You have to use WideCharToMultiByte twice, one to know the size needed and one to do the transformation.
LPWSTR lpszMsg;<br />
[...].br />
int iCharSize = WideCharToMultiByte(CODE_PAGE, 0, lpszMsg, -1, NULL, 0, NULL, NULL);<br />
LPSTR formatANSI = (LPSTR) HeapAlloc(GetProcessHeap(), 0, sizeof(char) * iCharSize);<br />
WideCharToMultiByte(CODE_PAGE, 0, lpszMsg, -1, formatANSI, iCharSize, NULL, NULL);<br />
HeapFree(GetProcessHeap(), 0, formatANSI);
HTH,
K.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
I have run into a small problem. I have an application (two of them really, but who is counting) that is trying to send a file across a socket. The code is working great and is in production. Now, we need to be able to send large files ( 50-60 Gb ). When I call TransmitFile with a handle to a large file, I get a 10022 error ("unexpected parameter"). The file that I am trying to send is 4.8 Gb in size. Does anybody know if this call is limited to a file that is less then a 32 bit integer size? I did find TransmitPackets, but that requires Windows XP and that is not acceptable. I am sort of stumpted on this one. For what it is worth, I am doing this in the context of IO completion ports if that matters. Any help would be great.
Thanks
James Rivord
JRivord@RegalCineMedia.com
|
|
|
|
|
What is TransmitPackets? Is that an MFC function? There are several solutions if you would implement IOCP in Winsock. One is to read and send sections of the file.
Kuphryn
|
|
|
|
|
TransmitPackets is a Microsoft extension to winsock implimented in XP only.
As for sending the file in sections, that is the only thing that I could think of also. I was hoping that someone could provide a work around that did not take the performance hit.
|
|
|
|
|
Sending a large file in chunks via IOCP is actually quit impressive in terms of performance. Winsock could only handle up to certain file size until the CPU has to wait for the NIC to transfer the data.
Kuphryn
|
|
|
|
|
I have a Doc/View application where I want to put a listview control in the CView derived class. Unforetunately I get the following error when the program runs : "Cannot create a top-level child window" on the two controls that I want in my CView derived class.
Ex
Defined in the MyView.h
CListCtrl m_lstCtrl;
In the OnCreate of CMyView
m_lstCtrl.Create(WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT, CRect(0, 120, 200, 200), this, 1); <-Error at this point.
What would I be doing wrong? I was pretty sure I could put a child view inside of another childview. As a side note, If I change this to pParentWnd, the list control draws, but the CMyView draws over it.
Cheers,
Clint
|
|
|
|
|
I just created a brand-new SDI project, added the OnCreate handler to the view class, and then your code, and it works fine. I then tried it with a new MDI project and it also works fine.
I suggest you try it yourself and check what the difference is.
Regards,
Alvaro
The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. -- Albert Einstein
|
|
|
|
|
Does anyone have a sample of how to add/remove a computer from the domain? I have tried DirectoryEntry, but it doesnt seem to delete the computer from the domain controller. All it seems to do is remove the trust to the domain, and it only works when the machine is powered on.
Thanks in advance...
|
|
|
|
|
I have a dll written with Delphi. Certainly I have no .lib, but I know how exported functions are declared in this dll.
Is it possible to make .lib from this dll to link it statically in C-compiled .exe?
Or maybe there is some other way?
|
|
|
|
|
Delphi doesn't give you a way to generate a LIB file for its DLL?
Anyway, if you know the exact signatures of the functions exported, you can then use LoadLibrary/GetProcAddress to call them. It's not fun, but it's the only way I know to do this.
Regards,
Alvaro
The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. -- Albert Einstein
|
|
|
|
|
Yes, this is obvious way. This way we link dll dynamically, right? I also think that it is the only way to link dll without .lib. But maybe some one knows the way to make the .lib for it?
|
|
|
|
|
I've seen this question asked here before and no one has come up with a solution. Frankly, I don't think there's a way to do it, but hopefully I'm wrong.
Regards,
Alvaro
The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. -- Albert Einstein
|
|
|
|
|
Thanks. You have declined me to suggestion that even it is possible, it is probably not worth it!
|
|
|
|
|
Yes, I think it can be done, I did something similar a few years ago, before I delve into my notes, they are not very good, do you have the header '.h' file that gives the function definitions, because without it is very difficult.
It is likely to take me a few days to sort it out, and to test it, so let me know, but I won't make any guarantees!
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|