|
Thanx DavidCrow,
I thought something like "http://myserver/isapilib.dll?str='fieldvalue'" to get the output string.
You say that, without changing anything in the html, I can write my isapi dll that will catch all the strings and convert when the form is submitted. right? It seems good in the way that it doesn't require me to change the htmls. I look more into this and get back to u with the progress.
Thank u so much,
Mahesh
|
|
|
|
|
PLEASE EXCUSE MY BAD SPELLING IF THERE IS ANY
I am using a MFC application that is dialog based and a staticaly linked library (if I dont make it statically linked and a sherd DLL insted wene I transfer it to another computer and try to run the exe it has an error saying it is missing mfc70d.dll)
I wont to use #include <fstream.h> so I can use the variable typs ifstream and ofstream as file pointers but if I include fstream the build log will give me the following error's
NJROTC error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" (??3@YAXPAXHPBDH@Z) already defined in nafxcwd.lib(afxmem.obj)
NJROTC error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" (??3@YAXPAXHPBDH@Z) already defined in nafxcwd.lib(afxmem.obj)
NJROTC fatal error LNK1169: one or more multiply defined symbols found
I know the include fstream will werk with a sherd DLL but I have to get it to werk with a statically linked librery
CAN ANYONE HELP ME PLEASE
|
|
|
|
|
This looks like a problem with the libraries linked in the wrong order.
You need to force them to be linked in the right order by entering them in the linker "ignore" field, then entering them in the correct order in the "object/library modules" field. I think you should have nafxcw.lib first.
jhaga
|
|
|
|
|
Check the the code creation type matches the libraries being used. ie. If you are using multithreaded debug DLL's then you code must generate this as well. In VC6 this Code Generation in the Project Setup from memory.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
I do not know if this will help.
When you transfer the program to another computer are you also installing the mfc70d.dll on that computer? If you are not, assuming it is not alread installed, then that explanes why you have to staticaly link the library. To use a non-staticaly linked .DLL libraray: You need to either create an istall program that not only installs your program but also installs the .dll. If you want to do a manual install then you will have to copy the mfc70d.dll into the System32 directory (if it does not already exist) before you run your program.
You may also need to install any other .DLL files that are not already on that other computer. The only thing I am not sure of is whether you will need to restart that other computer after installing the .DLL files.
I use InstallSheild to create installation programs, but I have not heard any thing bad about Wyse so either one should be very good for your purposes. There might even be a good shareware program out there that you can use.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hope that anyone can help me. I am new to socket() programming. I try to connect to a tcp server. However my program fails when its get to gethostbyaddr() function. It keeps returning "null". My questions are:
1) Is there a difference between AF_INET and PF_INET?
2) The gethostbyaddr() returns "null" because it can't not see the tcp server IP on the network for some reason ?(eventhough I can ping or telnet to tcp server)
Many thanks!
peter.
unsigned int addr;
struct hostent *hp;
SOCKET conn;
conn=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
addr=inet_addr("10.23.50.133");
hp=gethostbyaddr((char*)&addr,sizeof(addr),AF_INET);
|
|
|
|
|
well here are a couple of things:
1) Make sure you have initialized the winsock library. if you haven't that function would also return null. It sounds trivial but i have forgotten this many a time just to find out it was some simple mistake such as not loading the library.
Load it like this:
int nRet = 0;
WSADATA wsd;
memset( &wsd, 0, sizeof( WSADATA ) );
nRet = WSAStartup( MAKEWORD( 2, 2 ), &wsd );
2) There is a difference between AF_INET and PF_INET even though they are numerically the same. You should not rely on that fact because one day those numbers may change. The PF is a protocol family and the AF is an address family.
3) If all else fails you can have a look at this. I wrote this code awhile ago for my own library and use it frequently so i know it works.
BOOL ConnectServ( SOCKET* pSock, LPCSTR sServ, LPCSTR sPort, BOOL bOverlapped )
{
BOOL bConn = FALSE;
ADDRINFO* pAI = NULL;
int nRet = 0;
DWORD dwFlags = 0;
if( ! pSock ) {
return FALSE;
}
if( getaddrinfo( sServ, sPort, NULL, &pAI ) != 0 ) {
return FALSE;
}
if( bOverlapped ) {
dwFlags = WSA_FLAG_OVERLAPPED;
}
*pSock = WSASocket( PF_INET, SOCK_STREAM, 0, NULL, 0, dwFlags );
if( IsValidSocket( *pSock ) ) {
nRet = WSAConnect( *pSock, pAI->ai_addr, ( int )pAI->ai_addrlen, NULL, NULL, NULL, NULL );
if( nRet == SOCKET_ERROR ) {
CloseConn( *pSock );
}else{
bConn = TRUE;
}
}
freeaddrinfo( pAI );
Good luck.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Hi, everyone!
I want to use VC together with Matlab to do some digital signal processing projects. They have something to do with basic field specific theory. Just concept proof projects.
So I want to know where can I find some materials about this topic? Forums? Maillist? Better some VC or Matlab programs of this field.
Can anyone help?
regards,
George
|
|
|
|
|
hi
i want to use three radio buttons i.e radio1, radio2 and radio3 in a group box. As i click radio1 and then i press a button, a message passed in this method AfxMessageBox("hello"); must be appear, plz tell me the logic.
|
|
|
|
|
please make more clear what you want
|
|
|
|
|
CButton::GetCheck
will give you the state of the radio button.
BN_CLICKED Notification will tell you when a button has been clicked.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
yes handle the BN_CLICKED message with something like this:
void CMyClass::OnClickMyButton() //just example
{
if ( ((CButton*)GetDlgItem(IDC_RADIO1))->GetCheck() )
{
AfxMessageBox("radio1 checked");
} else
{
//check radio button 2 & 3
}
}
|
|
|
|
|
Hi friends,
i want to convert from bmp to 32 bit Gif file, any body help me
|
|
|
|
|
there is no such thing as a "32 bit GIF"
-c
|
|
|
|
|
I currently have visual c++ 6.0 pro, but I now need to use visual basic as well, i was wondering if i purchase the visual studio .net pro 2003 upgrade pack, would i get c++ .net, and vb .net?
|
|
|
|
|
How is this done? If you try to resize the combobox using either MoveWindow or SetWindowPos then the only thing that changes is the height of the dropdown or the width of the control but the height of the control in undropped state is a constant. And I need to calculate it at runtime, assuming this value changes if the user has a different theme than I do on my machine.
I suspected that GetSystemMetrics might help but apparently no value returned from that function matches the height of a combobox. Could it be a combination of some values?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Have you tried CWnd::GetWindowRect()?
CRect rc;
m_cbNames.GetWindowRect(&rc); // m_cbNames is mapped to a CComboBox control
TRACE("The height of the combobox is %d\n", rc.Height());
|
|
|
|
|
i am not really sure what you're after here. i mean if you're looking for the static height of a control you can just use
<br />
CRect rc;<br />
::GetWindowRect( hWnd, &rc );<br />
rc.Height();<br />
If thats not what you're looking for try to elaborate a bit.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
What are you trying to do? When you create a Combobox [or dropdown list] the height is dinamic, in other words it adjust to the closest size (resolution and operating system dependent) to the one you set it to in the resorce. There is no reason I can think of to do this out side the resorce editor, even if you are doing are doing a custom combobox.
If the problem is realy using the resorce editor then after you have placed the combobox control on your dialogbox then click on the arrow [that is displayed on the control in the dialogbox]. This will show you a sizing rectangle that will allow you to specify the perfered size instead of the single line height, which is the default height of the dropdown box.
Trust in the code Luke. Yea right!
|
|
|
|
|
I've got a little problem with messages.
I have a .dll that sends messages to an MFC app. The problem is the MFC app recieves theses messages more than once for everytime the .dll sends the message. The .dll uses PostMessage.
Is there anyway that I can make the MFC app call the handle once for everytime the PostMessage in the .dll is called.
The amount of times the MFC handle gets called is quite random depending on what else is happening on the system I can get it between 2 and 7 times.
Thanks
Darren
|
|
|
|
|
How about using something like:
while (GetMessage(&msg,NULL,0,0))
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
-Nick Parker
|
|
|
|
|
In your EXE's message handler for a particular message, try using a member variable that denotes busy or not busy.
ON_MESSAGE(WM_SOMEMSG, MyMsgHandler)
LRESULT MyMsgHandler( WPARAM, LPARAM )
{
if (! m_bBusy)
{
m_bBusy = true;
...
m_bBusy = false;
}
}
|
|
|
|
|
You have one of 2 problems:
1) Ether your program is requesting that the dll send the message twice.
2) Or the dll is actualy sending the message twice.
If you wrote the dll then you need to look at the code for it to find out what you did wrong.
If you did not write the dll then you need to find out what you did wrong in your program.
Work arounds:
If you did not write the dll file and you are absolutly sure that your program is not responsible (unlikely-but posible) then you need to set a flag, or use some other method, to determine if you have already handled the (exact same) message. The only problem with using the flag method is determining when to clear the flag so that you do not ignore the next valid message.
Again if you did not write the dll I would recommend saving the message (the Msg,wParm, and lParm) so that you can make absolutly sure that it is not the same message you received previously.
The method of setting a static flag inside the function/method its' self only works if you received a new message while you are still precessing (buzy) the previous message. (Exp: If want to prevent multiple occurances of an error dialog then write a function/method
for diplaying an error dialog that sets a static flag so that all other calls will be ignored until the user answer closes the first error dialog).
Trust in the code Luke. Yea right!
|
|
|
|
|
Thanks for all the answers. I've now approached the problem from a different angle and got it working.
Thanks for all the help
Darren
|
|
|
|
|
Due to the possibility of virus attack on 26th April last week, we changed the dates of all computers in our office LAN. And on 27th when the danger is over, we restored back the correct dates and times.
Since then we are having trouble on computers where Visual C++ 6.0 is installed. Problem is that whenever someone makes a slight change in *.h or *.cpp file of his project, Visual C++ starts rebuilding the entire project again. And after successful rebuilding, when we try to run the program, Visual C++ IDE again asks us that some files need recompilation
This problem is really irritating because for just a small change in a file, the entire project is getting rebuilt by the IDE. We tried everything, we deleted all the compiler generated temp files, program database e.t.c but nothing is working for us. This problem is present on every computer on out network where VC++ 6.0 is present. Any one wants to give advice ???
|
|
|
|