|
Have you changed the project settings to use UNICODE characters ? The linker is looking for a console application, but the project is being compiled as windows application.
- Malli...!
|
|
|
|
|
Please check this[^] and this[^]. Similar threads which contain solution for your problem.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
May be you defined UNICODE in project settings and doesn't defined the entry point
If so set Project Settings -> Link -> Output -> Entry-point = wWinMainCRTStartup
aks
|
|
|
|
|
I currently done with my programming for the CSP. The problem that I’m having is, I have the different result whenever I run the CSP program. FYI, currently I have 2 type of CSP dll, a.dll already been signed by Microsoft where b.dll is the one that I develop(still in the development stage).
Run in Vista Ultimate/Win XP SP3.
Replace the latest advapi32.dll(from one of the sources from Internet)
1. Place the a.dll and testcsp.exe to c:\windows\system32
2. Run command : regsvr32 a.dll result FAIL
3. Run command : cspSign c a.dll result PASS
4. Run command : regsvr32 a.dll result FAIL
5. Run testcsp.exe result PASS
Question : Is the result PASS because the a.dll already been sent to Microsoft for signing?
Replace the latest advapi32.dll(from one of the sources from Internet)
1. Place the b.dll and testcsp.exe to c:\windows\system32
2. Run command : regsvr32 b.dll result FAIL
3. Run command : cspSign c b.dll result PASS
4. Run command : regsvr32 b.dll result FAIL
5. Run testcsp.exe result FAIL
Question : Is the result FAIL because the b.dll is not been signing?
Use the original advapi32.dll
1. Place the b.dll and testcsp.exe to c:\windows\system32
2. Run command : regsvr32 b.dll result FAIL
3. Run command : cspSign c b.dll result PASS
4. Run command : regsvr32 b.dll result FAIL
5. Run testcsp.exe result FAIL
Question : Is the result FAIL because I didn’t replace the advapi32.dll?
Run XP (the same environment during the development of a.dll)
1. Place the b.dll and testcsp.exe to c:\windows\system32
2. Run command : regsvr32 b.dll result FAIL
3. Run command : cspSign c b.dll result PASS
4. Run command : regsvr32 b.dll result FAIL
5. Run testcsp.exe result PASS
Question : Why both of the b.dll is PASS?
FYI, a.dll was compiled using Visual 6.0 and b.dll was compiled using Visual Studio 2005. Is the compiler cause the different result of during the testing?
Thank You.
|
|
|
|
|
Hi All,
I am using msdev.exe to build my project in VC++ 6.0. VS2008 Professional dosend have msdev.
this is how i am using in 6.0
msdev PACERField.dsw /make "0BuildAll - Release" %1
What should i use in VS2008 to build my project in similar fashion.
Thanks
|
|
|
|
|
pratap1980 wrote: What should i use in VS2008 to build my project in similar fashion.
I suggest using the documentation[^]
led mike
|
|
|
|
|
msdev.exe - executable is the IDE of Visual Studio 6.0, which supports command line options to build project, as well. From Visual Studio 2003 onwards, the IDE executable changed its name to devenv.exe . That's why you are not able to evoke msdev by installing Visual Studio 2008. Well, check this article[^] about how to build project via command line by using devenv.exe .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
I'm fairly new to database programming, but I have been using MFC and C++ for a while. So, here is the problem I'm having.
Here is a basic description of the two tables I'm using.
PersonTable
PersonId, INT, AUTO_INCREMENT (Primary Key)
Name, VARCHAR(32)
ImageTable
ImageId, INT, AUTO_INCREMENT (Primary Key)
ImageBlob, LARGE_BLOB
PersonId, INT (Foreign Key)
Basically, I want to insert the person record into the person table, next insert the image for that person into the image table, and finally link the ImageTable.PersonId to the PersonTable.PersonId.
So, here is the code I'm currently using
<br />
personTable.AddNew();<br />
personTable.m_Name = "Joe";<br />
personTable.Update();<br />
<br />
personTable.Requery();<br />
personTable.MoveLast();<br />
<br />
long personId_ForeignKey = personTable.m_PersonId;<br />
<br />
imageTable.AddNew();<br />
imageTable.m_PersonId = personId_ForeignKey;<br />
imageTable.Update();
This works, but what concerns me is that this isn't safe for concurrent inserts. If multiple clients are inserting into the database, then I could get the wrong foreign key when I call "personTable.MoveLast()." Is there a better way to do this? Thanks!
-Will
|
|
|
|
|
mevatron1 wrote: Is there a better way to do this?
Yes, several, for example Stored Procedures[^]
led mike
|
|
|
|
|
Do you have an example of a stored procedure to do that for my simple tables? Will the imageBlob be a problem for the stored procedure?
-Will
|
|
|
|
|
mevatron1 wrote: Do you have an example of a stored procedure to do that for my simple tables?
Will, I also saw your reply to David. While there might be an example identical to your scenario I am not aware of one. That said there is certainly much information about stored procedures. They can be product specific so make sure you use the documentation and tutorials for the database product you are working with. Also there is a Database forum here at code project.
I strongly urge you to take some time learning about database programming. Like most subjects in software development, there are choices that come with benefits and detractors and not knowing the details of the subject (database development ) can lead to undesirable results.
led mike
|
|
|
|
|
Mike, Thank you very much for your advice. I will definitely continue to look into stored procedures to try to learn how to solve this problem.
-Will
|
|
|
|
|
What about wrapping the code in a transaction, like:
personTable.m_pDatabase->BeginTrans();
personTable.AddNew();
personTable.m_Name = "Joe";
personTable.Update();
personTable.Requery();
personTable.MoveLast();
personTable.m_pDatabase->CommitTrans(); I'm not sure if it's optimal, however.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I can certainly give this a try! Thanks for the reply!
-Will
|
|
|
|
|
Sadly, this doesn't work.
I set a breakpoint on the personTable.Requery() line
personTable.m_pDatabase->BeginTrans();
personTable.AddNew();
personTable.m_Name = "Joe";
personTable.Update();
personTable.Requery();
personTable.MoveLast();
personTable.m_pDatabase->CommitTrans();
I then ran another instance of the program to let it run to completion first, so I ended up with the imageTable.PersonId == 2 for both rows in the imageTable. Thanks for your time!
-Will
|
|
|
|
|
Few months back i had asked about how to disable USB ports thru vc++.
and i got replies saying disable it through registry.
one thing i forgot to ask.
if i disable the USB post through registry then will windows still recognise the USB ports??
and will it still send some power to it?
and is there any way to control the power to it?
basically m making a project on power management.
can someone help me out with it?
i need help on accessing BIOS from windows...
|
|
|
|
|
|
hey i jus saw the article
but this is want i dont like:
"DICS_DISABLE
Disables the device. If the device can be disabled but this function cannot disable the device dynamically, this function marks the device to be disabled the next time the machine reboots. "
i need to disable the USB port thru my prog and then enable it again without restarting the comp.
|
|
|
|
|
Hi,
I'd expect power saving to be apply to most devices, not just USB, so it's quite possible there is an API to do this. Just as the setup API I mentioned provided what I needed. In a quick search on MSDN I found http://msdn.microsoft.com/en-us/library/aa387973(VS.85).aspx. This starts off: "The CIM_PowerSupply class represents the capabilities and management of the power supply logical device.". I don't know if this applies to USB but this could be where you need to start researching.
|
|
|
|
|
hey thank you so much.
I'll search on that page for more info.Really thanks a lot for that link.Contains exactly what i need.
|
|
|
|
|
I want to show the icon with each record(row) in listview . I am using listview as recordview . how it is possible.
Trioum
|
|
|
|
|
Create an imagelist (CImageList).
Add icons to the imagelist.
Attach it to the listctrl.
While inserting items pass the index of the icon in the imagelist to the insert function.
|
|
|
|
|
Check out this tutorial[^]. It describes about everything about listctrl which includes how to add images in report view.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I need something similar to MSWord's "Type Your Title Here" or "[Type the document title]" thing in the view, so that the user can do in-place editing of the doc's title. How to start on this?
Please suggest.
Thanks
Ronnie.
|
|
|
|
|
Where is this at?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|