|
Good idea
whitesky
|
|
|
|
|
Cool
Regards,
Vinay Charan.
|
|
|
|
|
Hi All,
This is not a technical doubt. but it is related to C++.
one of my friend is searching for an International Certification in CPP (like Java). I donno why it is needed but she is sticking on that.
Pls give some suggestions.
SaRath
|
|
|
|
|
|
Is the brainbench certification is an accepted one ???
Still i am wondering that why the Microsoft ppl stopped the Certification Exam in C++ aka VC++..
Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
|
|
|
|
|
Am not sure about the acceptability of brainbench.
I think Microsoft just wanted to promote .NET certification.
|
|
|
|
|
renjith_sree wrote:
Still i am wondering that why the Microsoft ppl stopped the Certification Exam in C++ aka VC++..
Exam 70-536 can be taken as a VC++ exam.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
First, I posted a AcceptEx to IOCP for connection only, not to receive any data by this call (dwReceiveDataLength=0).
In the processing of AcceptEx completion, I called WSARecv.
There is trouble here:
If the client called connect, then called send after it.
WSARecv will return 0, the data is received.
So I use a while(WSARecv(...)==0) to receive data, while the loop end, I checked that WSAGetLastError()==WSA_IO_PENDING. It seems all right till now. Then suppose that the client doesn't send any data, but the next GetQueuedCompletionStatus will return TRUE for a WSARecv completion, but the received data in the buf is nonsense. Why the GetQueuedCompletionStatus will work this way?
|
|
|
|
|
buffer size >= 32 bytes? iocp could update with local/remote ip data
Kuphryn
|
|
|
|
|
Why a more completion of WSARecv?
|
|
|
|
|
what GetQueuedCompletionStatus() buffer size returned?
Kuphryn
|
|
|
|
|
The bytes received is the same as the prior call of WSARecv which return 0;
|
|
|
|
|
flawless on normal non-acceptex sockets? have both client and server code?
Kuphryn
|
|
|
|
|
I've sent the code to you.
Please check.
|
|
|
|
|
Looked code
question refers to code inside operation == SOCK_OP_ACCEPT?
Kuphryn
|
|
|
|
|
Yes, the probelm is if WSARecv(...)==0 (the data is received), GetQueuedCompletionStatus will be unblocked unnecessarily.
|
|
|
|
|
I have prototype in my Activex control as below and i am passing a class object from client application which has some member variables
void VRMControl::SetVariant(VARIANT VariantParam)
{
}
How can i convert this variant "VariantParam" paramter to my class type so that i can able to access those member variables. More over i can able to create object for that class in my Activex page so it should able to do right?. Please explain me how to type cast it.
|
|
|
|
|
sivaprakashshanmugam wrote: How can i convert this variant "VariantParam" paramter to my class type
The short answer:
You can't; this isn't and shouldn't be possible. COM (and therefore ActiveX) is interface based and language neutral and as such doesn't know anything about C++ classes: all it knows about is COM interfaces. Let’s imagine what would happen is this was done: COM objects are meant to be able to be used by any (COM compliant) language - If your COM object required a C++ class as input how can a client of another language, such as VB, possibly use it?
The long answer:
There are various hacks that can be used to work around this for inproc COM objects but they're dirty and result in a COM object that is only usable from C++. I'm not going to go into these techniques however because they are dirty hacks and there seems little point of going to the trouble of making a COM object but breaking the COM rules so you don't get the benefits of using COM; such as language neutrality.
The correct solution to this problem is to pass an interface to the method and don't expect to be able to pass a C++ object. You can make a C++ object which implements this interface (or a VB object that does for that matter).
Steve
|
|
|
|
|
How can i pass Interface method in this; it doesn't allow me to do it. Since it provides parameter data types as standard not our own. Is there any possibilities to do this please let me know it will be much better solution for me.
|
|
|
|
|
sivaprakashshanmugam wrote: How can i pass Interface method in
You don't. As always, you pass in an interface pointer. The called method calls whatever functions it needs to from the interface.
No offense, but you need to learn some COM basics or you’ll end up making a mess.
Steve
|
|
|
|
|
hi!
im making an app that gets image from a TWAIN Source. When scanning using 24-bit RGB mode, the raw data i get is in the order R G B.
However, it seems like GDI+ uses the order B G R. Anyone have an idea how I can easily/speedily swap these bytes? The data can reach a few dozen megabytes.
Thanks!
|
|
|
|
|
Use
DG_IMAGE / DAT_IMAGENATIVEXFER / MSG_GET
this source store image in BGR format in the buffer.
Regards
Anil
|
|
|
|
|
i AM using imagenativexfer. the data i am getting is RGB.
|
|
|
|
|
Hi
According to TWAIN specification
Notes:
· Do not use BITMAPCOREINFO or BIMAPCOREHEADER as these are for OS/2
compatibility only.
· Always follow the BITMAPINFOHEADER with the color table and only save 1, 4, or 8
bit DIBs
· Color table entries are RGBQUADs, which are stored in memory as BGR not RGB.
· For 24 bit color DIBs, the "pixels" are also stored in BGR order, not RGB.
· DIBs are stored ‘upside-down’ - the first pixel in the DIB is the lower-left corner of the
image, and the last pixel is the upper-right corner.
· DIBs can be larger than 64K, but be careful, a 24 bit pixel can straddle a 64K boundary!
· Pixels in 1, 4, and 8 bit DIBs are "always" color table indices, you must index through
the color table to determine the color value of a pixel.
Regards
Anil
|
|
|
|
|
Thanks for answering!
I got a little confused. I'm sorry.
I mean I was using the buffered transfer mode.
ICAP_XFERMECH, TWSX_MEMORY
This is because the images can get really really really large.
For ImageNativeXfer, you are right. It returns the proper Bitmap. However ICAP_XFERMECH, TWSX_MEMORY returns RGBs.
I've found a possible solution of using ColorMatrixEffect in GDI+....if only Microsoft REMEMBERED to include GdiPlusEffects.h in the SDK.
Do you have other ideas?
|
|
|
|