|
You last visited: Today at 19:31
Advertisement
functions dont work on other pcs?
Discussion on functions dont work on other pcs? within the .NET Languages forum part of the Coders Den category.
08/11/2016, 11:22
|
#1
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1,459
Received Thanks: 278
|
functions dont work on other pcs?
Can u answer this question:  ?
Nobody could give me a valid answer before.
|
|
|
08/11/2016, 14:23
|
#2
|
elite*gold: 0
Join Date: Apr 2010
Posts: 10,289
Received Thanks: 3,613
|
First of all, get your signatures from pinvoke:
What do you mean with "no work"? What do they return? Can you provide some code maybe?
|
|
|
08/11/2016, 14:28
|
#3
|
elite*gold: 46
Join Date: Oct 2010
Posts: 782
Received Thanks: 525
|
Quote:
Originally Posted by .Scy
MAYBE, just MAYBE, compile your code on the other computer before you say "it doesn't work". C# relies on the OS-libraries, as the comments pointed out, while a language like Java relies on Java-only(mostly) libraries. OS-libraries can vary alot.
go compile your code on the other computer and i bet magically it will work, since you installed the IDE that will simply provide the missing libraries OR compile the code into working byte-code.
|
Wtf. C# compiles to msil (AKA BYTECODE JUST FOR YOUR INFORMATION) and Java does compile to bytecode aswell. How does C# rely more on OS libraries than Java does ? BTW: The Windows API is stable and it doesn't vary alot (if they do anything, they add new functions). Please do some research before trying to help lol.
|
|
|
08/11/2016, 15:12
|
#4
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1,459
Received Thanks: 278
|
Quote:
Originally Posted by Shawak
First of all, get your signatures from pinvoke:
What do you mean with "no work"? What do they return? Can you provide some code maybe?
|
The signatures are already a part of code or what do you mean?
"No work" = The functions doing nothing, but also don't release an error. It's like they weren't in code.
|
|
|
08/11/2016, 16:04
|
#5
|
elite*gold: 0
Join Date: Apr 2010
Posts: 10,289
Received Thanks: 3,613
|
But you are using another signature than the one from pinvoke, what does the function return?
|
|
|
08/11/2016, 17:04
|
#6
|
elite*gold: 46
Join Date: Oct 2010
Posts: 782
Received Thanks: 525
|
Quote:
Originally Posted by .Scy
great point, java compiles to bytecode that is interpreted by the JVM, which in turn talks to the OS, so java byte code looks VERY different and obviously won't work without a JVM.
the JVM relies on system libraries, not the code a java programmer writes, most times(there are ways to interact with certain system libraries obviously).
and obviously it'd be smart to compile the code on the other PC to make ******* sure that it is not a portability problem. Stop trying to find a solution if you aren't even sure that the portability simply is the problem.
|
C# does exactly the same so now tell me how portability is a problem here ? And still the native function he's calling won't change its signature.
|
|
|
08/11/2016, 17:10
|
#7
|
elite*gold: 0
Join Date: May 2010
Posts: 6,853
Received Thanks: 5,106
|
Quote:
Originally Posted by .Scy
great point, java compiles to bytecode that is interpreted by the JVM, which in turn talks to the OS[...]
|
And MSIL ist interpreted by .Net Framework which talks to the OS (to use your words). So where is the different now?
Windows API is stable as @  pointed out already.
Another point your suggestion would fail: Compiling on another machine produces MSIL code again which has to be interpreted by the Framework which talks to the os (to describe it in your words again). So we still have 2 byte codes which may look different regarding the compiler settings, but both are indepent from the Windows Api they are compiled on...
|
|
|
08/11/2016, 17:29
|
#8
|
elite*gold: 0
Join Date: May 2010
Posts: 86
Received Thanks: 27
|
Quote:
Originally Posted by .Scy
C# relies on the OS-libraries, as the comments pointed out, while a language like Java relies on Java-only(mostly) libraries.
|
C# is as platform independent as Java is by specification. Simply spoken:
C# - Code is compiled into CIL (Common Intermediate Language, also known as MSIL). Then the JIT-Compiler (Just-In-Time) compiles the code into native Code (durirng runtime) that is executed on your machine. The JIT-Compiler is part of the Common Language Runtime (CLR) while CLR (in .Net Framework) is is the implementation of the Virtual Execution System (VES) specified by the Common Language Infrastructure (CLI) Standard.
Thats a really simple summary.
Some known implementations are .Net Framework (as most famous one), .Net Native or Mono.
So telling that C# relies on OS-Librarys entirely is incorrect.
Just wanted to point that out here eventhought is does not answer the problem
|
|
|
08/11/2016, 22:43
|
#9
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1,459
Received Thanks: 278
|
Quote:
Originally Posted by Shawak
But you are using another signature than the one from pinvoke, what does the function return?
|
Return is a void. What should it return?
|
|
|
 |
Similar Threads
|
[Problem]Functions in Quests doesnt work
06/05/2016 - Metin2 Private Server - 1 Replies
Hello Guys,*
As title states the functions in quest is not working in most cases*
for eg..*
quest guild_building_melt begin
** *state start begin
** *** *function GetOreRefineCost(cost)
** *** *** *if pc.empire != npc.empire then
|
Control send dont work in minimized window but work when is active
03/07/2016 - AutoIt - 4 Replies
Hi i have next problem i need to send 4 keys 1,2,3,4 in minimized window in game Forsaken World. It send keys but i dont see that it press it, and when i minimize window it dont works. I tired to see if minimized window is changed title but its not so i dont see a reason to dont send it, even with admin rights, 32 bit and 64 bit both tested and dont works. I tried with handle dont works too.
Second thing i have a macro mouse and i tried to use him and he works normaly, but i need program to...
|
[HELP] My Slots Functions won't work
09/03/2012 - WarRock - 4 Replies
Hi guys, i've got a tiny problem. My slots won't work (5slot, 6th slot...)
He's the function :
if(Slots ==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_SERVERPTR;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr + OFS_SLOT5)= 1;
|
[08.11.11]~ZhyCroX' Mini D3D - (all functions work)
11/09/2011 - WarRock Hacks, Bots, Cheats & Exploits - 13 Replies
Screen:
http://screensnapr.com/e/n8ODdc.png
Download: Klick here
Virustotal:Klick here
Credits:
~ZhyCroX me
|
[17.11] *JeFrYz* *Public* ×No Menu× - [Work all OS][15 Functions]
11/17/2010 - WarRock Hacks, Bots, Cheats & Exploits - 9 Replies
*JeFrYz* *Public*
___________
Functions:
_________
Super Jump
No Fall Demage
Speed
Small Gravity
Teleport
|
All times are GMT +1. The time now is 19:31.
|
|