|
I've finally made my DLL (with help that I am truly grateful for from many members of CodeProject - thanks for being patient ) .However I actually made the DLL to be called from Delphi instead of VB. I have been using VB because I know VB. But the function in the DLL accepts strings, which for VB I have used BSTR and __stdcall. Can I still use BSTR for Delphi and what about the calling convention? Thanks in advance for all your help!!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Just google it.
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
If your DLL api's input is a BSTR then the code in delphi has to pass the parameters in BSTR.
otherwize it will simple not work.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
I am facing a head scratching problem in building a Win32 Dll. I have some C++ classes in the Dll and I want to access these classes in a C++ client. These classes contain some static data and also Dll has some global data. I have successfully build the DLL, but when I use this DLL in client, I get Linker error "LNK2001: unresolved external symbol" for static as well as global data.
I viewed the exports of dll with dumpbin utility and dumpbin shows this data exported but linker is not finding it in the dll. I read somewhere that there is a SECTION statement in .DEF file which deals with the defualt scope of global and static data in a DLL. Can this be used to rectify this problem and if yes then how? As a note, I am not using .DEF file to build the dll, I am using __declspec(dllexport) keyword to export classes and global data from dll.
Please help me, I am scratching my head at the moment.
|
|
|
|
|
You sound like you're a lot smarter than me, so please forgive me if I sound stupid. But I was just wondering if you're actually #include-ing the header file and linking to the .lib file. Or don't you have to do this? Please don't think I'm being sarcastic, but I've just gone through a DLL hell of my own and I'm still kinda new, so I'd also like to know the answer;)
If it's broken, I probably did it
bdiamond
|
|
|
|
|
yes, I m including the header file and also linking with .lib file but ...........................
|
|
|
|
|
sorry, that's about the extent of my knowledge. Wish I could've been more help
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi there.
I am facing an issue. I am not able to invoke MS Outlook Exp. from my VC++ application. What I need is, when I click on a button, Outlook exp. should came up with an E-Mail address that we are getting from our own database.
Thanks and Regards,
Pankaj Bhalla
pankajbhalla@mantraonline.com
|
|
|
|
|
what do I have to search for to be able to fix large font/small fonts problems ?
The problem is that the dialog size is fixed ( which is not supposed to be, I think ) so now, in large font, some controls overlap; and I need to resize.
Is MapDialogRect the way to go ?
Is there a way to debug large font/small font without having 2 computers or need to restart each time I change the setting ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If you do your work in Large Font mode things will work out.
Todd Smith
|
|
|
|
|
i created new mfc application with multi doc/view. now, i would like to have also treeview in the main dialog. i would put it on the left of it. how to do that?
any ideas?
|
|
|
|
|
I dont have the exact idea... what all changes are to be made, but just for a help you can construct a new doc/view project with splitter window and checkout the OnCreate event of the frame thats where the splitters are created.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Option 1
Follow the excellent instructions from "Paul R Thompson"
Pauls Splitter Gear
Download and copy
MFC SplitterWnd Sample
Option 2
Copy this.
[1] Create new project (sdi)
Add this to MainFrm.h
CSplitterWnd split;
BOOL m_bInitSplit;
Initialise m_bInitSplit to FALSE in MainFrm.h constructor.
Override OnCreateClient in CMainFrame (alt+enter in VC 6.0 mode or ctrl-alt-x-click in BS .NET mode)
Add this
CRect cr;
GetClientRect( &cr);
if ( !split.CreateStatic( this,1,2) )
{
MessageBox( "Error setting up splitter frames!",
"Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
/* Note CTreeStuff is not defined yet. See later */
if ( !split.CreateView( 0, 0,
RUNTIME_CLASS(CTreeStuff),
CSize(200,50), pContext ) )
{
MessageBox( "Error setting up splitter frames!",
"Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
/* you will have to change this to your RUNTIME_CLAS CView derived class */
if ( !split.CreateView( 0, 1,
RUNTIME_CLASS(CtmpView),
CSize(cr.Width(),cr.Height()), pContext ) )
{
MessageBox( "Error setting up splitter frames!",
"Init Error!", MB_OK | MB_ICONERROR );
return FALSE;
}
m_bInitSplit = TRUE;
ensure that you replace
return CFrameWnd::OnCreateClient(lpcs, pContext);
with this
return TRUE;
Add a MFC class CTreeStuff deriving from CFormView
Drag a CTreeCtrl and plonk it your form view.
Add stuff to your tree control.
Regards,
axe
|
|
|
|
|
Solution is good, but really this wont go to the inbox of the original poster.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
|
lordgreg is the person who needs the help... so when you reply to me he will not be notified about the solution that you have posted. Thats what i meant to say.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Check back on code project for answer to your question.
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&df=100&app=50&fr=101
|
|
|
|
|
Hi Everyone,
I am looking for a SDK or a developer's tool that will allow me to write a program that will allow the user to visually edit an EMF file. In other words, I would like my program to let the user select different components of an EMF file and move or modify them.
Does anyone know of a SDK (C++ bases preferred) commercial or shareware, that could assist me in this project?
Any help is greatly appreciated.
Thanks,
A.
|
|
|
|
|
|
Thank you for the suggestion but this SDK looks to be a conversion tool rather than an editing/manipulation tool, which is what I really need. Once again thank you for the help and please keep me posted if you think of other sites.
A.
|
|
|
|
|
|
Thanks so much, you are great. I've been playing with their stuff all day and much to my chagrin it doesn't really do what I want. They are more about raster files and all that other stuff.
It's amazing to me that no one has come up with a SDK that allows you to edit an EMF file. I can't beleive I might have to develop this from scratch. I just hope I'm not missing something.
Anyhow, thanks again. I really appreciate it.
A.
|
|
|
|
|
I'm trying to use the SQLConnect function but I keep getting the odbc error 'Invalid string or buffer length'. In all the documentation it says to use SQL_NTS , but that doesn't work. It still doesn't work even if I put the actual string length in. Anybody know what's happening?
If it's broken, I probably did it
bdiamond
|
|
|
|
|
How are you calling SQLConnect ?
dNimrod#X
________________________
|
|
|
|
|
forgive me for being slow, but I don't really understand your question. Here's a sample of the code I'm using, (the slen variables were just added for testing):
sr = SQLSetEnvAttr(hOdbcEnv, SQL_ATTR_ODBC_VERSION
,(SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
if(BadSqlReturn(sr))
MessageBox("Error In Setting ODBC Version.");
sr = SQLAllocHandle(SQL_HANDLE_DBC, hOdbcEnv, & hDbConn);
if(BadSqlReturn(sr))
MessageBox("Error In Allocating Connection.");
sr = SQLSetConnectAttr(hDbConn,SQL_ATTR_LOGIN_TIMEOUT,(void*)5,0);
if(BadSqlReturn(sr))
MessageBox("Error In Setting Login Timeout.");
char szConnectString[512];
sprintf(szConnectString,"%s",strConnect);
SQLSMALLINT slen = strlen(szConnectString);
SQLSMALLINT slen2 = strlen(szUID);
SQLSMALLINT slen3 = strlen(szAuthStr);
if(slen % 2) slen++;
if(slen2 % 2) slen2++;
if(slen3 % 2) slen3++;
sr = SQLConnect(hDbConn,(UCHAR*)szConnectString,SQL_NTS
,(UCHAR*)szUID,SQL_NTS
,(UCHAR*)szAuthStr,SQL_NTS);
if(BadSqlReturn(sr))
{
AfxMessageBox("connection error");
displayODBCError(sr,"");
return 0;
}
If it's broken, I probably did it
bdiamond
|
|
|
|