|
How does it show in Depends.exe (which comes as a VStudio 6 tool)
How do both VC6 and VC7 dll compare in terms of exports using depends ?
|
|
|
|
|
What a cool program !
I dodn't know about it ! Thank you !
Under Depends it shows exactly as with dumpbin
vc6: it appears as VCF_DateTimeEvaluate
vc70: it appears as _VCF_DateTimeEvaluate@28
|
|
|
|
|
Hmmmmmmmmm ...
Try not putting the @1, @2 and @3 in the exports section .. see if it helps ?
|
|
|
|
|
Thank ou for all the help.
I will try to check what you suggested me tomorrow !
Cheers,
Marcello
|
|
|
|
|
|
Problem solved !
I had the feeling that vc70 was not reading this darn definition file, because by changing it it was not asking to rebuild.
So I looked around and I found the option:
Property Pages > Linker > Input > Module Definition File >
and there I put AutoExp.def
where the content is:
<br />
LIBRARY AutoExpEx<br />
DESCRIPTION "Implements Custom Evaluator for Microsoft Debugger"<br />
EXPORTS<br />
VCF_VariantEvaluate @1<br />
It works !
The linker screams both with the DLLEXPORT declaration and/or I do not use the '@'
Note that the help in VisualStudio says that we should not specify the file in the environment, only to include it into the project !
But it works.
Thanks a lot !
I really appreciated !
|
|
|
|
|
THe docs say:
"WSAEFAULT
10014
Bad address.
The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. "
I get 10014 (WSAEFAULT)from WSAGetLastError()
shm[0][0] = (void*) new char[50000000];
port_data = shm[0][0] ;
if(!port_data)
{
if(fpLog)fprintf(fpLog, "port_data is NULL\n");
}
nread = recv (socket_fd, char*)port_data,2730600 ,0);
}
nread turns out to be -1 (SOCKET_ERROR). The port_data NULL msg doesnt get printed.
I checked that the pointer is not null, and also that the size of the port_data is big enough...the two things that can make recv fail.
What should I look at as a source of this error ?
A note on the structure of the app:
I have the recv in a client loop over a set of files. Each file is opened and read by a server which sends the data to the client (who has the recv). This port_data is used by the client, NOT deleted, and then the pointer is reused for the next file If I run this with one set of files, theres no problem. But with another set, it arrests on the second recv (whatever the order of this different set of files). My server has no problem opening reading and sending the second file.
I break out when the server tells me to:
while (1)
{
recv(port_data..) <------------- one recv for each file send from server
do stuff with port_data
make sure its not NULL at this point
}
I havent changed the size allocated to port_data between recvs so it is always
50000000 I imagine. I dont know how to verify this for sure though.
Thanks,
sb
|
|
|
|
|
I'm trying to build a SDI-application in a dll. The problem is that the application of the exe (which runs and communicates with my dll) catches all messages. Ie if i push Ctrl+P in the dlls Window, the print-dialog of the exe's window shows up. Other messages like ID_INDICATOR_NUM (for updating the NumLock-State in the StatusBar) are also catched by the exe's message map.
In my eyes, the only solution is to create another thread which contains the dlls window, so that it has its own message map. But i did not get that working. Any ideas?
|
|
|
|
|
I'm importing data from a file, each data will have a name, and the name might not be unique, so I need to remove duplicates. the number of data can be huge, in the millions.
the data is inserted in a old C linked list, so I can't really scan the list each time, it will not be very optimal.
I was wondering if using a temporary std::map to insert the names can be an effective way of soing it ? each time I load a data from a file, find it in the map ? is it's there, skip it ... if not, insert it in my "database" and in the map.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
the data is inserted in a old C linked list, so I can't really scan the list each time, it will not be very optimal.
True, but if you used a binary search tree instead, you could get the number of scans down to 20-ish. You could also use a hash table. If the second instance of the item is encountered, it will have a hash value that is already in the table and can thus be skipped.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks David!!!
I need to review my hash table theory !!!
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I also use Ternary Search Trees for similar tasks as yours.
http://www.codeproject.com/csharp/tst.asp
|
|
|
|
|
I have a base interface called IBFace.
From IBFace, I have derived a base implementation class called CBFace.
I then declare a new interface called IBFace2, which derives from IBFace.
And finally, I wish to create a class that uses the base class CBFace implementation, but also derives from IBFace2 to allow me to supply the implementation. Lets call this final class CBFinalFace.
So the inheritance tree looks as follows:
IBFace
- CBFace
---------
- IBFace2 |
-----------> CBFinalFace
When I compile (with all the pure abstract functions implemented), I receive the C4259 warning that "pure virtual function was not defined". The functions it lists are all the functions from IBFace.
How do I get past this? It seems that even though CBFace implements all the functions, the fact that I derive from CBFace and then again from IBFace2 (which also derives from IBFace), I get the problem.
any ideas?
|
|
|
|
|
If I understand your problem correctly, I think you are expecting CBFinalFace to inherit the functionality implemented in IBFace by the CBFace class. This is not possible in COM, you can only inherit the actual interface. You will have to implement functions in CBFinalFace for your IBFace2 interface and your IBFace interface.
Incidentally, you'd have been better off posting this in the COM forum.
"Oh, I'm sick of doing Japanese stuff! In jail we had to be in this dumb kabuki play about the 47 Ronin, and I wanted to be Oshi, but they made me Ori!"
|
|
|
|
|
Actually, I'm not using COM at all. Sorry if the word interface mislead you. Yes, I know that in COM you cannot have implementation inheritance. But what I was doing was in straight, raw C++... no M$ or middleware involved.
so, interface can be read as struct
i.e:
struct I1 { virtual void fn() = 0; };
struct I2 : public I1 {};
class C1 :public I1 { void fn(); };
class C2 : public C1, public I2 {};
hope this clarifies my query a bit more
|
|
|
|
|
I am not a C++ guru, but this is how I understand the problem.
You have a diamond pattern:
<br />
I1<br />
/ \<br />
I2 C1<br />
\ /<br />
C2<br />
<br />
I1::f=0<br />
I2 f=? <br />
C1 f={}<br />
C2 ( f = I2::f or C1::f ? )<br />
which you should always try to avoid when you use multiple inheritance.
BTW: many people complain about multiple inheritance, but as long as you avoid a diamond patter, you'll be fine.
So C2 is asking which f() should I make visible ?
Your answer is: the one implemented. But this you know it only at linkage time.
You need to implement f also in I2 and still you'll get an error
because you still didn't answer the question ( f = I2::f or C1::f ? )
So you need to implement
C2::f() { return C1::f(); }
or you need to delete the declaration of f() in I1
Hope it clarifies.
|
|
|
|
|
Hello,
Is your declaration like this?
=========================================
class CBFace: public IBFace{...}
class IBFace2: public IBFace{...}
class CBFinalFace: public CBFace, public IBFace2{...}
=========================================
in case it is, try using virtual inheritance.
=========================================
class CBFace: virtual IBFace{...}
class IBFace2: virtual IBFace{...}
class CBFinalFace: virtual CBFace, virtual IBFace2{...}
=========================================
I hope it helps.
|
|
|
|
|
hi,
how can I convert a _variant_t object into a bitmap object?
the main problem is;
myRecordset->Fields->GetItem("mydata_picture")->Value;
here a _variant_t object returns.
I can change it into a _bstr_t object if the return value is;
myRecordset->Fields->GetItem("mydata_names")->Value;
picture variable type is IMAGE. names variable type is VARCHAR.
When I try to make this conversion into a bitmap object what must I do? First expression causes compiler error!
|
|
|
|
|
I do not know how to display a picture or a dialog box before the starting up of a program. Let's take PhotoShop for example. While loading it displays a picture with the authors of the program. I am writing in C++. Thank you.
modified 9-Mar-17 17:25pm.
|
|
|
|
|
|
Hi
i displayed the text in the grid control, if the string start with an alphabet it is left alligned and if it starts with number it is right aligned.. i want to align all the string either left or right
plzz help
|
|
|
|
|
nainakhawaja wrote:
i displayed the text in the grid control...
Which one?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i m so stupid i havent saw the properties properly yeah its ms flex grid control and yeah the problem is solved using SetCellAlignment(1); method.
|
|
|
|
|
Can anyone help me to solve my problem?
I try to improve the performance of SOAP by encoding the xml file become an binary file then compressing this binary file to a zip file at SOAP Server. After that, SOAP Server will send the zip file to SOAP Client. At SOAP Client, after receive the zip file, SOAP Client will be decompressed and de-encoded the zip file become a xml file. This process will help me to save bandwidth (too small). But my problem is that I don't know SOAP Client and SOAP Server recognize that zip file or not [in marshalling (at SOAP Server) and unmarshalling (at SOAP Client)process]?
Can anyone help me?
If possible, please send me an example source code and tell me where I can reference to solve this problem (it mean that documents).
Thanks a lot and best regards,
Lam Nguyen Duong
Lam Nguyen Duong
|
|
|
|
|
Hi! I have a problem checking and unchecking a menu item. The menu itself, is a context menu, activated when the system tray icon is right-clicked. When the user clicks a certain menu item, I want to check/uncheck it and take some action accordingly. I handle the click on the menu item like this:
void CZdnDlg::OnContextmenuStartup()
{
CMenu mmenu;
mmenu.LoadMenu(IDR_CONTEXT_MENU);
CMenu* submenu = mmenu.GetSubMenu(0);
UINT state = submenu->GetMenuState(ID_CONTEXTMENU_STARTUP, MF_BYCOMMAND);
ASSERT(state != 0xFFFFFFFF);
if (state & MF_CHECKED)
{
submenu->CheckMenuItem(ID_CONTEXTMENU_STARTUP, MF_UNCHECKED);
//some action 1...
}
else
{
submenu->CheckMenuItem(ID_CONTEXTMENU_STARTUP, MF_CHECKED);
//some action 2...
}
}
If initially the menu item is checked, then it takes "some action 1...", but it does not uncheck it. If initially the menu item is unchecked, it takes the "some action 2..." and it remains checked.
Why does this happen? Please help me!
danibanez
|
|
|
|