|
Well, since that is not a Windows error message, I can only assume it is specific to the library you are using.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Also i see some difference in Sp's DLL which i created and actual working vendors DLL
Difference noted using PE studio's exported sysmbols option
DLL Created by ME:
<pre lang="c++">_WFPCancelAsyncRequest@8,-,1,-,-,.rdata:0x00001096
_WFPClose@12,-,2,-,-,.rdata:0x00001005
_WFPDeregister@20,-,3,-,-,.rdata:0x00001140
_WFPExecute@24,-,4,-,-,.rdata:0x00001131
_WFPGetInfo@24,-,5,-,-,.rdata:0x000010EB
_WFPLock@16,-,6,-,-,.rdata:0x00001023
_WFPOpen@52,-,7,-,-,.rdata:0x0000102D
_WFPRegister@20,-,8,-,-,.rdata:0x00001073
_WFPSetTraceLevel@8,-,9,-,-,.rdata:0x0000113B
_WFPUnloadService@0,-,10,-,-,.rdata:0x0000100A
_WFPUnlock@12,-,11,-,-,.rdata:0x00001082
Vendor created DLL:
WFPCancelAsyncRequest,-,1,-,-,.rdata:0x0000C450
WFPClose,-,2,-,-,.rdata:0x0000C6E0
WFPDeregister,-,3,-,-,.rdata:0x0000C7F0
WFPExecute,-,4,-,-,.rdata:0x0000C970
WFPGetInfo,-,5,-,-,.rdata:0x0000DFA0
WFPLock,-,6,-,-,.rdata:0x0000E490
WFPOpen,-,7,-,-,.rdata:0x0000C030
WFPRegister,-,8,-,-,.rdata:0x0000E590
WFPSetTraceLevel,-,9,-,-,.rdata:0x0000E710
WFPUnloadService,-,10,-,-,.rdata:0x0000E770
WFPUnlock,-,11,-,-,.rdata:0x0000E8F0
What is the difference.Does export method differ??
|
|
|
|
|
You've hit the nail on the head! The ones on the bottom are exported like so:
extern "C"
{
}
The ones on the top are exported in C++ fashion, with name mangling.
Try exporting your functions as extern "C" .
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Thanks your tip help me to start some invetigation.All these days we were with LINUX. Migrating to windows seems little difficult for me.
Where should :
extern "C"
{
}<pre></pre>
be added??
Because SPITesh.H, the code has the expected tag...
#ifdef __cplusplus
extern "C" {
#endif
SPITEST_API HRESULT WINAPI WFPCancelAsyncRequest(HSERVICE hService, REQUESTID RequestID);
SPITEST_API HRESULT WINAPI WFPClose(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPDeregister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPExecute(HSERVICE hService, DWORD dwCommand, LPVOID lpCmdData, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPGetInfo(HSERVICE hService, DWORD dwCategory, LPVOID lpQueryDetails, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPLock(HSERVICE hService, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPOpen(HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion);
SPITEST_API HRESULT WINAPI WFPRegister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPSetTraceLevel(HSERVICE hService, DWORD dwTraceLevel);
SPITEST_API HRESULT WINAPI WFPUnloadService();
SPITEST_API HRESULT WINAPI WFPUnlock(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
#ifdef __cplusplus
};
#endif
|
|
|
|
|
What you show inside SPITesh.H is the correct placement. Is that your file or the original vendor's file?
In Visual Studio, when you compile the code as C++, it should automatically define __cplusplus .
If it doesn't, then it might be that your source file extension is ".c" when it should be ".cpp".
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, I sm trying to follow the same. but still it is doing no good.
https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view[^]
The link contains the project ref files i made sure all files are CPP and Extern C just for the headers.
What else should i look ifor?? is there some settings that i should set in VS 2010 Express
|
|
|
|
|
Try placing the
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
};
#endif
in the CPP file also, surrounding the functions you want to export. I think that is the issue.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
NO luck still....
|
|
|
|
|
I'm sorry. Maybe someone else will have some better ideas.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
If possible can you just try downloading the code and check with your MS VS version??
|
|
|
|
|
I did. It won't compile because of a number of undefined symbols in SpiTest.cpp .
Quote: 2 IntelliSense: cannot open source file "xfsconf.h" d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 7 1 spi_QuantumT_bcr
3 IntelliSense: identifier "WFMOpenKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 13 spi_QuantumT_bcr
4 IntelliSense: identifier "WFS_CFG_MACHINE_XFS_ROOT" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 24 spi_QuantumT_bcr
5 IntelliSense: identifier "WFMQueryValue" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 154 8 spi_QuantumT_bcr
6 IntelliSense: identifier "WFMCloseKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 161 2 spi_QuantumT_bcr
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
XFSMANAGER INSTALLER: ftp:
That is the libray link.
|
|
|
|
|
I'm sorry, I'm not going to install anything on my development machine.
Take a look at this article: extern "C"[^]
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
No problem , I will try some option too...
|
|
|
|
|
Compiler: Visual Studio Standard Edition 4.0
Language: C/win32
My program uses 10 edit controls three of which are read only and 2 push buttons. I am using the tab-stop style
controls. My problem is that when navigating the controls
with the mouse the program hangs after clicking each input
control about six times. If I navigate the controls with the tab key I don't have this problem at all. This program
performs calculations for building an antenna for amateur
radio use and includes a graphic of the antenna.
EDIT:
If I process WM_LBUTTONDOWN in the main window 40-50 times the program hangs. So it happens even if I'm not using the edit boxes. Sorry if I'm not making everything clear. The user
enters values and then presses the calc button for one calc and does the same for another
calculation. Two sets of edit controls and two push buttons.
modified 20-Nov-14 8:21am.
|
|
|
|
|
Member 11145709 wrote: My problem is that when navigating the controls with the mouse the program
hangs after clicking each input control about six times Are you clicking it 6 times in succession, or clicking it once to gain focus then clicking some other control then some other control etc round-robin style until one of them has been clicked 6 times?
Member 11145709 wrote: This program performs calculations for building an antenna for amateur radio use and includes a graphic of the antenna. Does that have anything at all to do with the problem? If these calculations and image drawings are not taking place until a "go" button is clicked, then you can omit this part from consideration. Otherwise, if you are performing calculations and drawing images in response to controls receiving/losing focus or changing content, therein may be where you need to look.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
The graphic is simply used as a diagram of the antenna that pictures the dimensions needed
for the equations. I do mean that values are plugged into each field six times or so before
the program hangs using the mouse to select each field. So, if the user does a lot of playing
around with different dimensions and frequencies during the same session and uses the mouse to change from one field to another the program might hang.
|
|
|
|
|
Hi
Is there a manual or web site or book or ... that has describe office automation classes for C++?
I mean classes like(for Excel) :
CApplication
CWorkbooks
CWorkbook
CWorksheets
CWorksheet
CRange
CFont0
....
because the method parameters names is not named good, and in MSDN there is no complete reference like MFC classes.
I use word and excel automation in our MFC app
Thanks
www.logicsims.ir
|
|
|
|
|
It's a small subset of what you are looking for, but see if this helps.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thanks
but I'm looking for a complete manual.
www.logicsims.ir
|
|
|
|
|
Good luck with that. I've just learned it all by trial and error over the years. MSDN does have a reference, which is fairly complete. For the missing pieces, empirical testing is your friend.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
hello i want reserve string in c just using(string.h) such strcat and strcpy and strcmp libirty
without (for or poniter)
how???
|
|
|
|
|
Hi, I thing when you say poniter its pointer.
All strings and arrays in C are pointers so you cant change it.
However if you want to create a string otherwise you can use malloc, with malloc you can create one array of any size, you can see it here
But you have other way to do it, if you want to read a string for keyboard you may be need to use strdup() from string.h
|
|
|
|
|
hay
i want reserve without chang index for array
exmple with change index:
char array[20];
int i,j;
gets(array);
j=strlen(array);
for(i=j-1;i>=0;i--)
{printf("%c",array[i])
}
i want use (strncat & strncpy with for)...for Reverse string
but i don't know how i can do this
::
ex ::
char array[20];
int i,j;
j=strlen(array);
for(*******)
{
strncat(****) or strcat(***)
or strncpy(***) or strcpy;
}
and in the end i want Reverse string
|
|
|
|
|
|