|
I have some(not actually few) html files that contain forms.I have a task to accomplish in this.
The task is, i get a string (typed by user while filling the form) and need to do a database lookup (through ODBC) and apply some algorithm(right now it is a dll written in VC++) to convert the data to the required form. The data typed by the user should go through this stage before getting submitted to the server.
What I want now is, I am struggling to find the correct way of doing it. Can it be an ActiveX control in VC? Then I need to sign it before using. Can I create a ATL HTML Control? But can other part of html call the function of this control (as like ActiveX)? I need to learn more abt that 'window.external', i suppose.
And what else can I do?
Thanx in advance,
Mahesh
|
|
|
|
|
I would be inclined to write an ISAPI DLL. That assumes, of course, that you have access to the server to put such a file in place.
|
|
|
|
|
Thanx for ur interest, DavidCrow,
The ISAPI DLL will be running in Server. right? For every string, (every field of form) it has to goto server and get it done. (U may argue that I need database look-up and its not possible to have that in every client. But this application is for Intranet and i am planning for Oracle server and all the clients connecting through the ODBC) If u assume there is no databse look-up, what would u be inclined to do?
Once again, Thank u so much,
Mahesh
|
|
|
|
|
Mahesh Perumal wrote:
The ISAPI DLL will be running in Server. right?
An ISAPI filter is a DLL that runs on an ISAPI-enabled HTTP server to filter data traveling to and from the server. The filter registers for notification of events, such as logging on or URL mapping. When the selected events occur, the filter is called, and you can monitor and change the data (on its way from the server to the client or vice versa). ISAPI filters can be used to provide enhanced logging of HTTP requests (for example, to track who is logging on to your server), custom encryption, custom compression, or additional authentication methods.
|
|
|
|
|
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
|
|
|
|