|
I use this solution, then it's working.
|
|
|
|
|
please include that headerfile..
|
|
|
|
|
I already include that header file
|
|
|
|
|
I read the UAC article on CodeProject. So I want to see what others are using to elevate when using CreateProcess on Windows Vista, maybe Windows 7, when I get to testing on it.
I'm using CreateProcess to run PkgMgr.exe, but it wants elevated privileges 740.
Plus I want to spawn 2 threads, one to run the progress bar, and one to run the CreateProcess.
Tried _beginThread, but I was only able to get 1 working at a time.
|
|
|
|
|
There shouldn't be any thread creating issues related to UAC... I use them all over the place, haven't had an issue, after all, they're all part of the same process... CreateProcess() I imagine does require the elevated privileges since you're spawning another process other than what the user selected to run.
|
|
|
|
|
I didn't think of it that way.
Perhaps I should get their credentials in a dialog box, and run CreateProcessWLogon.
ShellExecuteEx works, it's checks for permission, and goes, but is hard to track when it's done.
|
|
|
|
|
You could do it whatever way works best for you AND your user... for example, if you expect your average user to not have admin privileges on his machine, then you should probably avoid adding any code that's going to require admin level privileges (unless you absolutely have to).
|
|
|
|
|
I'm going to leave the code the way it is for now.
I ran CreateProcess first, and checked for an error, then used ShellExecute if error 740 comes up. I'll conduct more testing on Windows 7 and Server 2008 to see how it works out.
|
|
|
|
|
Good luck
|
|
|
|
|
Didn't work out.
Any system changes requires a UAC elevation, so I went ahead and made a dialog box asking for credentials that I can pass to CreateProcess with Login. So I will play nice with UAC and adhere to the purpose of it. I just hope I get it right this time.
Now I can use the luck.
|
|
|
|
|
UAC is a pain in the butt... but ultimately, it's Windows trying to recreate the same, more secure, method of operations that's been used in a lot of Linux distros for a while now. Should mean security in the long run... headaches in the short term.
|
|
|
|
|
Hi All,
I want convert BIG integer value to string
for that i used
_strtoi64
that convert values still 9,223,372,036,854,775,807
but for big value greated than "9,223,372,036,854,775,807" it gives wrong value
have i convert greated than "9,223,372,036,854,775,807" value to string??. .
|
|
|
|
|
You cannot convert values greater than the maximum allowed for a 64 bit integer.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You already got answers to your same question in the Quick Answers question at [^]
|
|
|
|
|
Either the title or your explanation is wrong. I guess you need to convert a string representing a very big number to, well, a big integer variable.
As Jochen pointed out, we already answered your question at QA.
However, if you really don't want to use a big integer library then may you roll you own version of, say, strtoi128 , i.e. a function converting the given string into the 128 bit binary representation of the number (you may mimic the method used at school to perform division).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If it doesn't exist... make it yourself... +5
|
|
|
|
|
Thank you.
However, I realize it would be a bit difficult for a newbie.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Definitely... but it is worth noting that they can do it themselves if need be.
|
|
|
|
|
Dear Friends
I am building an application as dll. Its building with 'no common language runtime support'. But if I build with 'common language runtime support (clr)' then its giving errors. Can u tell me whats going wrong.
Here are the errors 2 linking errors
[code]
Linking...
Creating library C:\Users\sujan.dasmahapatra\Documents\Projects\Bhagavan_SurfaceRevolution\RevolutionProj\Debug\RevolutionProj.lib and object C:\Users\sujan.dasmahapatra\Documents\Projects\Bhagavan_SurfaceRevolution\RevolutionProj\Debug\RevolutionProj.exp
mfcs80ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in msvcrtd.lib(dllmain.obj)
C:\Users\sujan.dasmahapatra\Documents\Projects\Bhagavan_SurfaceRevolution\RevolutionProj\Debug\RevolutionProj.dll : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://c:\Users\sujan.dasmahapatra\Documents\Projects\Bhagavan_SurfaceRevolution\RevolutionProj\RevolutionProj\Debug\BuildLog.htm"
RevolutionProj - 2 error(s), 55 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/code]
|
|
|
|
|
How did you create the project? I understand that you have created a native dll and enabling the clr option for the build and that is why the linker error. BTW why do you want to build the with clr enabled?
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
yes anshuman i want to build the dll with clr enabled. what can be done ? pls help me..
|
|
|
|
|
I'm not sure exactly what the issue is but I suspect you are including a library that should not be part of your DLL. This article[^] has some further suggestions that may help in the conversion process.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
how can make my dll clr support. By just changing the option to clr support is not successfully building. What could be done to make it managed. Its a pure C++ MFC application. Any help would be appreciated...
|
|
|
|
|
You cannot convert MFC to CLR just by changing a compiler option; indeed why would you? If you want to make your code into a CLR library then you need to look through all your code to see that it is compliant.
This rather begs the question: exactly what are you trying to achieve?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
I have a text file that looks like
0 0:3649 1:1643563 2:563726 3:2358500 4:1706041 5:1399436 6:1021542 7:2612862 8:2399618 9:2177296 10:507745 11:2504905
1 0:2072009 1:1497603 2:886529 3:43699 4:266555 5:1062838 6:429603 7:483804 8:2882799 9:1299756 10:347278 11:13617
2 0:25988 1:1101998 2:1550469 3:1665724 4:1754902 5:1770655 6:484783 7:1933614 8:1314619 9:1026882 10:166341 11:1772168
3 0:2284363 1:2340611 2:1516115 3:880566 4:2554567 5:2119179 6:2787658 7:2699637 8:1572897 9:415096 10:1347549 11:686279
The first element is the line number nad then it is arranged as 'attribute:value'. Due to large number of elements one line of data spans two or more lines of a text file. please note that there are no empty lines I have just done it for clarity.
how to read the first elements of each data line(in this case 0, 1,2 ,3) regardless of the the numebr of lines spanned in the text file
any help will be appreciated
thanks
|
|
|
|