|
Hi again..
This is continuance from 2 Nov '09
Is there any another solution for win XP ?
I try this:
<br />
[DllImport("ntdll"), SuppressUnmanagedCodeSecurity]<br />
public static extern int NtGetCurrentProcessorNumber();<br />
and I get this exception:
System.EntryPointNotFoundException was unhandled
Message="Unable to find an entry point named 'NtGetCurrentProcessorNumber' in DLL 'ntdll'."
Source="XP_Multicore_try_0"
TypeName=""
StackTrace:
at XP_Multicore_try_0.Program.NtGetCurrentProcessorNumber()
at XP_Multicore_try_0.Program.loop() in C:\Documents and Settings\evyatarv\Desktop\XP_Multicore_try_0\XP_Multicore_try_0\Program.cs:line 24
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
|
|
|
|
|
ntdll.dll is a native code dll. You will not be able to access this dll from user code.
You have to write a native code service or driver to access it.
Greetings
Covean
|
|
|
|
|
Covean wrote: ntdll.dll is a native code dll. You will not be able to access this dll from user code
All of the Windows core is native code, and its API functions can be accessed perfectly using P/Invoke.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Once again you are right. I can invoke it. Just ignore my post.
Greetings
Covean
|
|
|
|
|
so..
Did I do something wrong ?
Why I get this exception ?
Thanks..
Evyatar
|
|
|
|
|
Can you please give me an example, I think I don't realy understand what
I'm needed to do to make it work.
Thanks..
Evyatar
|
|
|
|
|
That message is thrown when the method can't be found in the library. You might want to try to use the GetCurrentProcessorNumber method instead.
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern int GetCurrentProcessorNumber();
Hope this helps
I are Troll
|
|
|
|
|
Windows XP does not support this.
|
|
|
|
|
|
Building a windows service which needs to call a custom DLL. When I try to start the service it gives me an error stating it can't find the DLL. Which makes since since I was unable to register the DLL using Regsvr32. If I take out the DLL the service works fine (minus functionality of custom DLL). If I create a project with the same functionality as the service everything works fine once I add a reference to the DLL. Is there anything I can do to get the windows service to work with this custom DLL?
Only thing I have found is to add the DLL to the System32 direcotry which I have done.
|
|
|
|
|
What is the exact error message you are getting ?
|
|
|
|
|
Ever tried to get the current directory of your service? I think this will not be the directory
you are awaiting, normally its C:\Windows\system32 for services.
So if your dll is not in the C:\Windows\system32 directory you have to find out
where your service install path is.
For example:
Registry.GetValue("HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\[yourservice_name]", "ImagePath", null);
Greetings
Covean
|
|
|
|
|
Thanks Covean. As usual I amde it much more difficult than it needed to be. All I had to do was put the dll in the same directory as the file used to create the service. Thanks, you pointed me in the right direction.
|
|
|
|
|
Give Some Idea to get this Approach
I want to create folder access permission for entire of system ... Once if the folder has assigned to the login permission in our application , that is give a password of access that folder .... Dont access with out permission in authentication person
How can i do this scenario through C#
Thanks
|
|
|
|
|
Your question isn't very clear at all. I'm guessing you want to assign passwords to folders in the file system??
|
|
|
|
|
ya .... Sorry for explanation
Need a folder Access permission... like folder lock software
|
|
|
|
|
This requires writing a file system extension to NTFS. This is something that you cannot do in C#, only C++. On top of that, you also need to write a management app that manages the passwords and can reset them. Of course, you can't just let anyone reset the passwords either. Even that is going to need its own security. By the way, this is always something a newbie comes up with. Noone ever writes it when they find out how much work it really is to do.
|
|
|
|
|
Hi,
I have a text object on my crystal report. The text interpretation is "RTF text". Data in this text object appears in correct format except tables.
What is problem with table?
|
|
|
|
|
The CrystalReport RichTextBox doesn't support tables, and a bunch of other stuff.
You can read more about it here[^].
|
|
|
|
|
Thanks for your reply.
Is there any way, through which I can display tables in RTF text object?
|
|
|
|
|
Use a monospaced font and create the tables using ASCII characters.
|
|
|
|
|
Thanks again Dave,
that is good solution, but I will take to much efforts. Actually I need some quick solution.
|
|
|
|
|
You're only other solution is to NOT use Crystal Reports and use some other reporting package.
|
|
|
|
|
Hi Guys,
I have dragged and droped a timer control "tmrGetMappingXML" from the Common Controls Tab in Tool Box. The issue that I am mentioning also appears for the Timer Control present in the Components Tab in tool box.
In the form Load i have written:
tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds
tmrGetMappingXML.Enabled = True;
tmrGetMappingXML.Start();
The timer interval is also set in the design time to 3600 seconds.
But the Tick event of the timer fires continuously every second. Fed up.
Please suggest.
Regards,
Sourabh
Thanks and Regards,
|
|
|
|
|
Dot Net Jantu wrote: tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds
The Interval property is given in milliseconds. You need to multiply your number by 1,000
modified on Friday, November 13, 2009 8:39 AM
|
|
|
|