long __stdcall GetAccountCodeFromAccountNumber(char*, long);
in your .cpp file
long __stdcall GetAccountCodeFromAccountNumber(char* caAccountNumber, long nCharacterCount)
long nReturnValue = 0;
.. do what ever you want kinda stuff.
what's needed in the VB program
Public Declare Function GetAccountCodeFromAccountNumber Lib "TradeInput.DLL" ( ByRef AccountNumber asString, ByVal AccountNumberLength as Long ) as Long
Dim AccountNumber asString = "123456";
Dim AccountNumberLength as Long = 6;
Dim AccountCode as Long = GetAccountCodeFromAccountNumber(AccountNumber,AccountNumberLength);
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"AAAAAAAAAHHHHHH!!!!! Those leaks are driving me crazy! How does one finds a memory leak in a garbage collected environment ??! Daniel Turini Nov. 2, 2002.
i tried what you have here, but unfortunately im still getting my Run-time error 453 - Can't find DLL entry point GetAccountCodeFromAccountNumber ...
i tried what goes in the .cpp file both with and without the class name preceding the GetAccountCoddeFromAccountNumber(char*... but it didnt make a difference.. im going to try to create a new project (instead of using the one in the introduction to com example) .. what type of project should i select? MFC DLL im assuming.. ill let you know if that does anything for me..
Hi there everyone,
I will be very grateful to get any clue/direction about a problem, which I have on the last couple of days:
How can I transfer a rough audio buffer to an audio streaming, I have looked at the sample of this subject in the MSDN and I saw a sample which works properly only with WAV file – I want to check it with a buffer.
if you are reading in during serialization and have any 'new' keywords you could get a memory leak if your loading serialization is called multiple times without deleting what was created the previous time the data was serialized.. i know that was my problem once..
if not then i dunno try searchin for 'delete' in this board and you will come accross a bunch of ppl who have had memory leaks.. including me
It's not a developer's tool, but it can help keep your PC running smoothly over long periods of time by freeing up memory that Windows thinks is in use. It works especially well on Win9X and ME which frequently "runs out of memory" when it shouldn't.
I've got some RAW images and I have to open and process them: so I thought it was a good idea to get them and load them into CBitmap objects, in order to use MFC GID function, instad of readin each pixel with two FOR cycles.
RAW images have no header and they are 35MB large, I've tried this way:
*) CFile file;
*) BYTE* pData = new BYTE[fileSize];
*) file.Open(path, CFile::modeRead);
*) file.ReadHuge(pData, fileSize);
*) m_bmp.CreateBitmap(m_BmWidth, m_BmHeight, 1, m_BmBpp, pData);
Variables are class attributes.
Debugging the code, is like I can't get the CreateBitmap method working.
1. RAW (almost by definition) has no specified format. it's usually the 'raw' uncorrected data dump from a CCD, scanner or some other device, in some undocumented format, not meant for your use.
2. CreateBitmap expects the data to be in a specific format, one which .RAW almost certainly doesn't conform to. (specifically, word-aligned pixel rows, probably with bottom-up scanlines and in BGR/BGRA channel order for 24/32 bpp images)
your best bet is to try to find out the format that your particular "RAW" image uses (good luck, and don't assume it applies to every other file with a .RAW extension), parse it into the format that CreateBitmap expects (32-bit RGBx is probably the easiest). then, you might get an image, though it will likely be in some color space (maybe logarithmic RGB , for fun) that you'll need to post-process. and, the image might need color balancing, color correction, sharpening, scaling, etc. before it looks like any kind of reasonable image.
When history comes, it always takes you by surprise.
When using CRichEditCtrl, you can catch the ENM_CHANGE message when you want to be notified of text changes.
But, I'm using CRichEditView inside an MDI-application. How can I get notified of text changes?
I don't want to catch WM_KEYUP cause then I have to catch all events like WM_LBUTTONUP, WM_RBUTTONUP, drag&drop events, copypaste events, ...
And when I want to add a message/event handler, there's no such thing as a ENM_CHANGE event.
If I have a modal dlg, and post a message to the parent, can it send me back the results (by passing in the data through a member function of my dlg in the ONMessageHandler), so that I can communicate back and forth and display info returned from the parent when I ask for it? Then when I am all done, I dismiss it....I would test it out but it needs a lot of machinery to put into place and I was wondering if its obvious that this will/wont work....?
MAny thanks. I plan to display a sequence of images in the cDialog which are sent from the parent in response to the users request from the Cdialog. For some reason I had thought that since it was modal it couldnt be dynamically refreshed unless it was dismissed and reModal-ed with the new info....
Appreciate your help,
Last Visit: 31-Dec-99 19:00 Last Update: 29-Jan-23 13:28