|
I found out the problem: iVariable ;((
I used the size of another -smaller- disk file (i used it to load a file buffer in memory). The "smaller" makes all difference and actually did the partial buffer load that I noticed.
Anyway, I'm now sure that new and malloc have the same usage and that they both create contiguous memory buffer.
Sorry and thanks )
Yarp
|
|
|
|
|
In OLE/COM Object viewer My object present in the folder : Automation Objects but if I try open it by press on the + , I gets the messageBox:
------------------------
CoGetClassObject failed
class not registered
REGDB_E_CLASSNOTREG(..)
------------------------
I try to register it again by: regsvr32 <dll filename="">
but I get error message that the LoadLibrary failed .
(the path is clearly ok !).
What can I do ?
|
|
|
|
|
According to MSDN
Q. What are the reasons an ATL server might fail to register?
The following also applies to ATL 3.0:
A. The following are the top three reasons an ATL server might fail to register:
You built your project with _WIN32_WINNT=0x400 (the default), and you are not running the ATL server under Windows NT 4.0 or you do not have an up-to-date version of Oleaut32.dll. To solve this problem, run "DUMPBIN /EXPORTS OLEAUT32.DLL" and search for UnregisterTypelib. If it is not there, then your server cannot run. Remove this #define statement from Stdafx.h if you want to run the ATL server under Windows 95 or older versions of Windows NT. Alternatively, you can use LoadLibrary and GetProcAddress so that you can run optimally under both Windows 95 and Windows NT 4.0. The Oleaut32.dll that ships with the Internet Explorer 3.x is up-to-date.
You built your project as MinSize and Atl.dll is not properly installed on the system. The correct version of Atl.dll must be copied and registered by Regsvr32. There are Windows NT and Windows 95 versions of Atl.dll. The Windows 95 version runs under Windows NT. However, since it does not use the UNICODE APIs, it is slightly less efficient. Unless you build your project as MinDependency, you will need to install the correct version of Atl.dll and run Regsvr32 on it before you install your server.
You built your project as UNICODE, and you cannot run it under Windows 95.
The following are the steps to troubleshoot:
For a DLL server, run Regsvr32 in the debugger. Open the Project Settings dialog box and click the Debug tab. In the Executable for debug session text box, enter the full path to Regsvr32.exe, such as C:\Sharedide\Bin\Regsvr32.exe. In the Program arguments text box, specify the full path to your DLL, such as C:\Myprojects\MyFolder\Debug\MyFile.dll. Set a breakpoint at DllRegisterServer and start stepping.
For an EXE server, run it in the debugger and specify /REGSVR as its command-line argument.
I suggest if you need to ask this question again tomorrow you try to provide some more information, because it's obvious based on what you're asking that either you're not providing enough info, or you have got the right answers and want to hear something else. Have you got your books yet ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
thank you
So this is what I understant from all this :
*For the DLL server*
-----------------------
Open the Project Settings -Debug tab.
In the Executable for debug session text box, enter the path to Regsvr32.exe and In the Program arguments text box, specify the full path to my DLL.
Is that all ?
* I have windows98
|
|
|
|
|
To be honest I opened MSDN and looked for something that sounded helpful. What the above is going to do is pass the dll path as the argument to RegSrv32, it's the same as navigating to the dll path and typing regsrv32 mydll.dll in the console.
If you don't have access to MSDN, try msdn.microsoft.com, there are a lot of articles that matched my search, you might find something more helpful there.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I tried it and I gets again the errorMessage that it failed !
I dont understand where exactly I have put a breakpoint (What means "at DllRegisterServer" ???)
|
|
|
|
|
If you don't have a dllRegisterServer function, then RegSrv32 is obviously not going to work.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
excuse me ,
I found this function and I put in breakpoint but the debug dont arrived
to this func.
I needs help urgently with my poblem !!!!!!!
I dont success to register my dll !!!!!!!
|
|
|
|
|
What compile option have you used for your ATL DLL? Is it Min-Dependencys or Min-Size?
Michael
|
|
|
|
|
Can you explain me what means Min-Dependencys or Min-Size ?
I simply compile with f5 ,f7, ctlf7
|
|
|
|
|
When you choose the configuration to compile, you can choose minimum dependancy or minimum size. What they mean is a no brainer - one compiles to include all the code it needs, the other leaves out whatever it can to keep the size down. I believe this function is one you loose in min size, because there are other ways to register, but the details escapec me.
Mimi, if you logged in I would have got an email telling me you responded to my comment and I would have been able to reply sooner. Not that the other comment is no good, chances are he knows more about it than me, but I'm trying to point out the benefits of logging in. After two weeks of the same questions we all know it's you, so if you were hoping to be anonymous, you'll have to ask about something else ;0)
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
He's having promblems spelling "anonymous" too.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
I wanna know the width and height of a window in pixels!?
How to?
/
|------
\
|
|
|
|
|
Client area -> GetClientRect()
whole window (borders, caption) -> GetWindowRect()
---
Blessed are those who can laugh at themselves, for they shall never cease to be amused
|
|
|
|
|
CRect rc;
cwnd.GetClientRect ( &rc ); rc.right is the width, and rc.bottom is the height.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Normally GetClienRect() would work fine, if it doesn´t give you the size in pixels you have to change the viewport
HTH
Braulio
|
|
|
|
|
CRect rect;
GetWindowRect(&rect);
int nWidth=rect.Width();
int nHeight=rect.Height();
Jerzy
|
|
|
|
|
Hi,
I have made a database application using VC++ this database application connects to the Microsoft Access file via ODBC. I want to create an installshield setup to install this software on client system. I don't know how install shields can create a new User DataSource (in ODBC in ControlPanel) so that installed application can run properly.
Any help or hint or what so ever is welcome
Thanks for ur time .....
~Statbat( );
|
|
|
|
|
I have dont some setup application using Installshield.It is very very easy and selfexplanatory.do u have Installshield installed in ur system.u can mail me for additional help.my email id is ujustmailme@email.com.
bye
|
|
|
|
|
There are two ways you can do this. Installshield has an ODBC wizard, or you can create the registry entries from a script. What version of Installshield are you using?
|
|
|
|
|
Hi,
I am using InstallShield Profession 6.1
Does this have the wizard or I have to use anyother Installshields?
Thanks for ur time .....
~Statbat( );
|
|
|
|
|
Hmmm, this doesn't answer your question, but why not connect to Access without creating a DSN? Do a search for DSN-less connections on MSDN.
Regards,
Alvaro
|
|
|
|
|
hai
i am getting Exception error & Sharing viloation error while running my application . it's aborting.
what may be the cause.;)
Ashu
|
|
|
|
|
Hello. I am having problems trying to print my vector. When it goes through the add it works, but when i want to use my printfunction it doesnt work. I have created a person struct and when the prompt comes around it is to be entered such as
>"add name @address #number
>"add name @address
>"add name #number
and then it is to print out the vectors at
>print
and it doesnt work for some reason
I have attached my code.
Thanks
karen
kginsberg@hotmail.com
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct person
{
string name;
string address;
string number;
};
void addfunc(string s, vector<person>& address1, int add)
{
person temp;
int addrindex, phoneindex;
addrindex = s.find('@');
phoneindex = s.find('#');
if(addrindex!=-1 || phoneindex!=-1)
{
if(addrindex<phoneindex)
{
="" temp.name="s.substr(add+3," addrindex-(add+3));
="" temp.address="s.substr(addrindex+1," phoneindex-(addrindex+1));
="" temp.number="s.substr(phoneindex+1," s.length()-(phoneindex+1));
=""
="" }
="" if="" (addrindex="">phoneindex)
{
temp.name=s.substr(add+3, phoneindex-(add+3));
temp.address=s.substr(addrindex+1, s.length()-(addrindex+1));
temp.number=s.substr(phoneindex+1, addrindex-(phoneindex+1));
}
}
if(addrindex==-1)
{
temp.name=s.substr(add+3, phoneindex-(add+3));
temp.address=" ";
temp.number=s.substr(phoneindex+1, s.length()-(phoneindex+1)); //phone index is the pound sign
}
if(phoneindex==-1)
{
temp.name=s.substr(add+3,addrindex-(add+3));
temp.number=" ";
temp.address=s.substr(addrindex+1, s.length()-(addrindex+1));
}
address1.push_back(temp);
//&address1.push_back(temp);
cout<<address1.size();
}
void print1(const="" vector<person="">& address1)
{
for (int i = 0; i < address1.size(); i++)
{
cout << address1[i].name <<address1[i].address<<address1[i].number<<endl;
}
}
="" *
void="" delfunc(int="" input,="" vector<person=""> &addressbook)
{
for (int i = input; i < addressbook.size() - 1; i++)
{
addressbook[i].name = addressbook[i+1].name;
addressbook[i].address = addressbook[i+1].address;
addressbook[i].number = addressbook[i+1].number;
}
addressbook.pop_back();
}
void findf(string input, vector<person> book)
{
int check;
for (int i = 0; i < book.size(); i++)
{
check = book[i].name.find(input);
if (check != string::npos)
//print current person
check = book[i].address.find(input);
if (check != string::npos)
//print current person
check = book[i].number.find(input);
if (check != string::npos)
//print current person
}
}
*/
void main()
{
char a[80];
vector<person> addressbook;
int add=0, print=0;
while (add!=-1)
{
cout<<" >";
cin.getline(a,80);
string s=a;
add=s.find("add");
addfunc(s, addressbook, add);
}
while (print!=-1)
{
cout<<" >";
cin.getline(a,80);
string s=a;
print=s.find("print");
print1(addressbook);
}
/* switch (action)
{
case "add":
addfunc();
break;
case "find":
findf(input, addressbook);
break;
case "del":
del();
break;
case "print":
print();
break;
case "exit":
cout <<"you are now exiting the program\n";
break;
default: cout << "\n> ";
}
*/
}
|
|
|
|
|
Hi
Does anyone know where I can find a nice tutorial about writing a DLL under VC++
Thanks
|
|
|
|