|
Didn't you try that same suggestion yesterday?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
i m unable to run openCV program in VS C++ !!! please help.....
csetopper_bhanu
|
|
|
|
|
csetopper_bhanu wrote: i m unable to run openCV program in VS C++
Why?
csetopper_bhanu wrote: please help
How?
|
|
|
|
|
Hi
I am trying to install an application in USB which makes USB as a read only i.e. it should be working as a dongle. Pls let me know how it can possible using vc++.
Thanks
SNI
modified on Tuesday, November 17, 2009 3:50 AM
|
|
|
|
|
SNI wrote: Pls let me know how it can possible using vc++.
Specifically what trouble(s) are you having?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I am trying to make USB as a dongle. I am wondering how it can be achieved using VC++ or any other languages. Is USB dongle is same as USB Tocken?
SNI
|
|
|
|
|
Hi.
I'm trying to find out with this.
I have to change every single xls to csv manualy. Any sugestion, how can I do this in C++? There must be something! I'm a beginer in C++, want to lern it. Any hint welcome!
Many thanks.
pswierq
|
|
|
|
|
pswierq wrote: I have to change every single xls to csv manualy.
Rename or convert?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I've got this app -- that wants to run with elevated priv's.
I've added to the manifest:
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="highestAvailable" uiAccess="false">
</requestedPrivileges>
</security>
</trustInfo>
Is it possible to make the app auto-start with elevation?
The app can run without elevation... but in order to make use of some API's I need more rights.
The question -- is there a way to register the app so that it's pre-approved to run elevated? I'd like if the user can approve it once and never be asked again?
The app needs to run at the startup of the user session. I find that it won't start itself at login with this manifest.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Peter Weyzen wrote: Is it possible to make the app auto-start with elevation?
There is an autoElevate flag but it seems that it only works for certain executables signed by Microsoft. I do not know if Microsoft plans on supporting auto-elevation for signed third-party applications.
Peter Weyzen wrote: The question -- is there a way to register the app so that it's pre-approved to run elevated? I'd like if the user can approve it once and never be asked again?
No thats not how UAC elevation is implemented.
Best Wishes,
-David Delaune
|
|
|
|
|
I looked at autoElevate -- Microsoft looks quite restrictive on that, as most of their own apps aren't allowed to use it.
Is my only recourse here to tell the user they "can't have it" unless they elevate it or disable UAC?
Are there any runtime API's which I can call to request elevation of the process? Or, is it the case that the security mode cannot change once the app has started?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
In vista there are 2 modes, one is with UAC enabled (in which u r currently working) and other is UAC disabled. In 2nd case the OS will be running as without security and it will be possible for you to run ur application with required priviledges. But to make UAC disabled you need to have Admin rights. The code that you have provided is for manifest file and using this file it will prompt user to provide admin priviledges while running any application.
SNI
|
|
|
|
|
to go a little further -- how does the whole world of UAC apply to services?
How would a service go about getting admin priveleges?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Peter Weyzen wrote: I looked at autoElevate -- Microsoft looks quite restrictive on that, as most of their own apps aren't allowed to use it.
As it should be.
Peter Weyzen wrote: Is my only recourse here to tell the user they "can't have it" unless they elevate it or disable UAC?
Correct. In my opinion the UAC changes are just as much a cultural change as a functional change. In my opinion both Windows users and developers have really bad habits. I have never hear any Unix/Linux develpers complain because they don't automatically have root access.
Peter Weyzen wrote: Are there any runtime API's which I can call to request elevation of the process? Or, is it the case that the security mode cannot change once the app has started?
A process with a restricted token cannot impersonate a higher access level. You will have to deal with the UAC prompts if you continue to use functions which require administrative access. You could however use an elevated DCOM component or an out-of-process COM server with broker functions.
Some documentation:
Redesign for UAC Compatibility[^]
How Access Tokens Work[^]
The COM Elevation Moniker[^]
Best Wishes,
-David Delaune
|
|
|
|
|
UAC is a good thing -- I think process security is an important thing.
But think about me. I write backup software, and I want to add "volume shadow copy" support to my stuff.
When UAC is in place, I am denied access to it to the shadow services...
Is there a way the user can get backup rights without getting into the UAC mess?
(for me it's a mess)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
I need to know what the Active Page is before the User goes to another Page. The reason for this, I need to collect the data on the Page the User just left. I may need to insert the data the User entered on the Previous Page into the Page the User has selected to go to next. This is not a "Wizard" type CPropertySheet!
A C++ programming language novice, but striving to learn
|
|
|
|
|
|
Supperman wrote: "Use CPropertySheet::GetActivePage[^] to get the active CPropertyPage object. "
Remember, I may want to display data to the now Active Page BEFORE it is presented. I need to be able to do that!
How do I stop the showing of a selected Page before I have a chance to update the Data that may need to be displayed on the selected page?
A C++ programming language novice, but striving to learn
|
|
|
|
|
Override the OnKillActive method in the property page derived class.
From here you can communicate with the property sheet class using messages or events.
The property sheet class can then act as a mediator to copy the necessary data.
|
|
|
|
|
As he said:
OnSetActive and OnKillActive should be overridden on each panel. When you exit one panel, OnKillActive is called -- at that point save data from that panel... then on the new panel OnSetActive can load the data needed.
I do this all the time, it works great!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Yes, that works great. Thanks.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Hi
I am trying to understand how to solve this one:
There is given a table with clients and products
Like that
client_code product_code1
client_code product_code2
client_code product_code3
Each row has client code and product code.
Table is sorted according to clients.
Program should count how many times given client bought products.
Unfortunately it should be done with pessimistic complexity O(log n)
where n is amount of elements in the table.
Any ideas?
|
|
|
|
|
I assume you are storing this information in a container that supports iteration.
Cowork wrote: Each row has client code and product code.
Table is sorted according to clients.
Program should count how many times given client bought products.
So client details will be repeated as one client can purchase multiple products?
With your current storage structure, it is tough to get O(log n) complexity. Work with std::lower_bound to get an iterator to the element matching search criteria. This does a binary search and will have logarithmic complexity. Now move the iterator forward and increment a counter until you reach to a different client. This will have linear complexity.
If you can arrange your data in such a way that client holds the products he purchased, you can get the information easily. std::lower_bound will give the client and call a method on it to get the products purchased. This will lead into logarithmic complexity.
I hope you are aware that binary search is slow on collections that has few items. I believe mixing linear search and binary search depending on the container size will give you better performance.
Best wishes,
Navaneeth
|
|
|
|
|
I am sorry
Would you please explain more clearly how can I use binary search to _count_ products bought by the same client ?
As far as I understand it ,it only allows me to find given element in a table (if the element exists in the table)
Thanks
|
|
|
|