What does this Code means?
-
:rose: Hi. Can someone explain what does this code mean??When i search for something in that code i see such thing with diffrent methods. It's really nice of you to explain what does it do?Why we use it?And where we must use this? Thank you.
[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]
:rose: CanI
-
:rose: Hi. Can someone explain what does this code mean??When i search for something in that code i see such thing with diffrent methods. It's really nice of you to explain what does it do?Why we use it?And where we must use this? Thank you.
[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]
:rose: CanI
This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak:rose: Thank you, I don't mean to explain just this line Code
[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]
I mean totally what is Mean?And how to use and when to use??? Explain me like a teacher... Thank you. :rose: CanI
-
This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak:rose: Thank you, I don't mean to explain just this line Code
[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]
I mean totally what is this?And how to use and when to use it??? Explain me like a teacher... Thank you. :rose:
-
:rose: Thank you, I don't mean to explain just this line Code
[DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]
I mean totally what is Mean?And how to use and when to use??? Explain me like a teacher... Thank you. :rose: CanI
I already did. I'm not writing up an entire lesson plan for you in a forum post. I gave you a starting point. This is where you start doing research and teaching yourself. Without that skill, you're not going to last long writing code.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak