liveinternet.ru: �������� ���������� ���������� � �����������

������������, ����� ( ���� | ����������� )

 
�������� � ��� ����������� ����� ����
chingachgoog
��������� 12.01.2011 - 19:11
��������� #1


������� �����������
*****

������: ������������
���������: 1179
�����������: 27.02.2009
��: Moscow
������������ �: 9144



Zinc ��������� ������� ������������ dll-�� 1
������ �������� ����� ������������ ����������� �������� ����������, �.�. winAPI. ����� ������� ���������� �� ����� ����������� ����������� ������������ �� ����������� �� ���������� ���������� �� �������������� ������ ���� �� � ������. � ����� �� �� ������� ���� �������� �������, ���� �� ����������� ������ ����� � dll-����.

���� �������� � ��������� ��������� �� ������� dll � ���� ������� �������� (�� ���� �����). ��� ������ ������������ ����������� ������ � dll, �.�. ������ ������� winAPI, ��������, ��������� � ���������� ������� ������ (��������, ���������). ������������ ��������� ��� �������� �� ��������� ������� ���������� ������������ dll-��������� (����������) ����� ������ � "��������" dll-����. �������� ��� ��������� �� ������, ���� ���, ��� ������ �� ����������� ��� ActionScript-������������� ������ ������������. � ���� �� ���� ���� �������������� ����������� ��������� ��� ������� � ����������. ������� ���� ������ ������������.

� ��� ��� ���-�� ����� �� ������ (������? smile.gif ). �������� ��������� ������� � ��, � ����� ������� ��, ��� ����� ���� ����� �������. ��� ��������� ������������ � ��� - �������� �� ��������, � ������ ������ (������) ��� �������� �������� (����� ���������!). ������� ������� ��� ������ - �������� "����� ����" ��������� ��� � ����� smile.gif � ��� �� � � ������� �� � �������� �������, ���� �� �� ������� ����� �������� tortMaker-� � ����������� ������ �� alexcon314, ������� � �����-�� � ����� ��� ������.

���������� �������.

������������ ����������� ���������� msvcrt.dll � ��� ������� � ���:
malloc - ����������� ����������� ����� ������ (������) � �������� ����� ������� �� ���.
memset - ���������� ��������(�) � ���������� ������ ������
memcpy - ��������� �������� �� ���������� ������ ������ (������������ ������ �����, �� ������ �� ������� �������� ������� � ����� � "������������ ����")

���
msvcrt = new mdm.DLL(mdm.System.Paths.windows+"/system32/msvcrt.dll");
////////////////////////////////////////////
//       ���������� ��� ������������      //
////////////////////////////////////////////

function getUserName(){
    msvcrt.clear()        
    msvcrt.addParameter("integer", 0xff);
    var memU = msvcrt.call("integer", "malloc");
    
    msvcrt.clear();         
    msvcrt.addParameter("integer", 4);
    var memN = msvcrt.call("integer", "malloc");
    
    msvcrt.clear();
    msvcrt.addParameter("integer", memN);
    msvcrt.addParameter("integer", 0xff);
    msvcrt.addParameter("integer", 1);
    msvcrt.call("integer", "memset");
    
    advapi32.clear(); // BOOL WINAPI GetUserName( __out    LPTSTR lpBuffer, __inout  LPDWORD lpnSize);
    advapi32.addParameter("integer", memU);
    advapi32.addParameter("integer", memN);
    var b = advapi32.call("boolean","GetUserNameA");

    advapi32.clear();
    
    msvcrt.clear(); // void *memcpy( void *dest, const void *src,  size_t count );
                                    // dest - New buffer.
                                    // src - Buffer to copy from.
                                    // count - Number of bytes to copy.
                                    // Return Value - The value of dest.
    msvcrt.addParameter("integer", memU); // ����� ������ ������
    msvcrt.addParameter("integer", memU); // ����� ������ �� �������� �������� (��� ����)
    msvcrt.addParameter("integer", 0xff); // ����� ������ ������� ��������
    var u = msvcrt.call("string", "memcpy"); // ������������ �������� �� ������ ������

    msvcrt.clear();
    msvcrt.addParameter("integer", memU);
    msvcrt.call("integer", "free");

    msvcrt.clear();
    msvcrt.addParameter("integer", memN);
    msvcrt.call("integer", "free");
    
    msvcrt.clear();
    
    return u
}


������� �������� � winAPI ����������� ��� �����������!

1 ���� �������� � ������� DLL � ����� �����������:
- ����������� �� ���������. ��� ���� �����, ���� ������ (�� ���� ������ ������ ���� ����� ������ 3, ������������� ��� �����(!) � ������� �� ������� ����� WINE)
- ����������� �� ���� dll. ���������� ����� ���� ������ win32-����, com � .NET �� �����������.


--------------------
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
tiHo
��������� 12.01.2011 - 20:32
��������� #2


C:\>
*****

������: ���������������
���������: 1604
�����������: 10.04.2006
��: ������� ����, 3-� ������� �� ������, ������, ���������� �������, ���������.
������������ �: 293



���������, ������� �� ����������.


--------------------
������-����� ��� flash-�������������
� ��� ���, ��� �� ������ ��������������� ��������� ����������, � �� ��� ������ �� �������. (�) �������� �.
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
MustLive
��������� 13.01.2011 - 00:21
��������� #3


������� �����������
*****

������: Flash Zone Team
���������: 4952
�����������: 10.03.2005
��: ����
������������ �: 5



������
Zinc ��������� ������� ������������ dll-��

������ �� ����� � dll � WinAPI (����� Zinc � ������ ������) - ��� ������ ���������. � ��� ������������� ����� ��� �������� ���������� ���������� ����� ������ �����������. ����� ����� ������������ �� ������ ����������� ������ ����� (�.�. ������ ������� exe-������ �� ������), � ����� ����� ������� ����������� ���������� (�������� ���������� � WinAPI).

������� chingachgoog, ������� � ���������� tortMake � alexcon314 ����������� ������ �������� ������, ������� ��������� �������� ����������� Zinc (� ��������� �� �������� ���������� �������). ������ ���������� ��� �������� ����������� ����� wink.gif.

������
�������������� ������ ���� �� � ������

����� ��� �� � ������ ����� ��������������� smile.gif. ��� ��������������� ����� - �������� ������������ ���������� �� ����� �������, �������� � ������������� ������. � �������� ������� �������������� ����������� � ��, ��� ������ ��� �������� ������ �������� ������. ������ ������� - ��� ��� ���������. ���� ������ ���� ���� � �������� ����.


--------------------
Best wishes & regards,
MustLive
������������� �����
http://mlfun.org.ua
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
Chaos
��������� 27.02.2011 - 02:56
��������� #4


�������
*

������: �������
���������: 2
�����������: 27.02.2011
��: �����
������������ �: 10355



�������!)
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
Varcharamir
��������� 4.02.2012 - 08:33
��������� #5


�������
*

������: �������
���������: 2
�����������: 4.02.2012
������������ �: 10866



������� ����������, ��� ����� ����� ������������ ���������� ������. � �����������, ��� ������ ������������ � ���� ��������� (������) � ����, �� ��� �� �����-����� �������� � ������? ���, ������, ���� �����-�� ������� ������� � ������� � �� ����. � �������� �� ��������, ���� �� �������������� ������� ��� Zinc 4.0. mdm �� ��� ��������� ��� ������������ �������� �� ����� ���������� �����������, �� � ���� �� ���� ������ �� ������� ��� ������. �.�. ������ � ���, ������ �� ������������� � ����� ���������� � ����� ������?
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
chingachgoog
��������� 7.02.2012 - 21:50
��������� #6


������� �����������
*****

������: ������������
���������: 1179
�����������: 27.02.2009
��: Moscow
������������ �: 9144



��� ������������ ������ ��������� ��������� � �������. )))

��� �������� 4-�� �����, �� ���� �� ��������� ����� ������ � dll ������� ��� ���������. ��� ��� ��� ��������� ��-��������.


--------------------
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
Varcharamir
��������� 16.02.2012 - 08:44
��������� #7


�������
*

������: �������
���������: 2
�����������: 4.02.2012
������������ �: 10866



�������. ������ ������ � �� ������, ��� ��� �������. ���� ����� ���� ����� ������ � ��������...

� ���� ��� ���� ��������� ��������. ��� ���������� �������� ������ �� �������, ��� ��������. � C++ ��� �� ����������, ��� function1(&function2). ��� ������� void (�.�. ������ �� ����������). ��� � �������, ��� ���� �������� ��������� �� ������ ������� function2. ���-�� ����� mydll.addParameter("integer", function2); , � ����� ������ �� � ������� mydll.call("none", "function1");. �� � ����� ������, ��� ��� ������ �� ������.

� ������ ������ ����� �� ���-�� ������� ���������� ���������� �� dll-�� ��� ��� �� �� ����� ���������� � �� ��������� �� � Zinc? �.� ����� �� ��� ������� ��� �������� �������������� �������, ������� �� ���������� ��� ����������, ��� ����� �� ������?

��������� �������������� Varcharamir - 16.02.2012 - 08:50
��������� � ������ ��������
 
+�������� � ������������ ������� ���������
chingachgoog
��������� 17.02.2012 - 16:08
��������� #8


������� �����������
*****

������: ������������
���������: 1179
�����������: 27.02.2009
��: Moscow
������������ �: 9144



��, �������� �� ���. ������ ���������� ������������� ���� ������.

��� ���� ������� �� ��������:

malloc - ����� call("integer", "malloc") �������� ����� ������� �� ����������������� ������.
memset - call("integer", "memset") ���������� ��������(�) � ���������� ������ ������. �� �����, ������ ��� ����������� �������� integer, � �� none. ����� � none ������� )))
����� �������� ������� � �����������... ������ ��� ���� ���� ����� �������, ������� ��� ����� ...
memcpy - call("string", "memcpy") ��������� �������� (������) �� ���������� ������ ������ (����, ��� �� �������� � call("integer", "malloc"))

������(Varcharamir @ 16.02.2012 - 09:44) *
� ������ ������ ����� �� ���-�� ������� ���������� ���������� �� dll-�� ��� ��� �� �� ����� ���������� � �� ��������� �� � Zinc? �.� ����� �� ��� ������� ��� �������� �������������� �������, ������� �� ���������� ��� ����������, ��� ����� �� ������?


���� ������ ���� �� ����� �������? ���� �� ����/����, �� ��� ��� �� �������/��������, ���� ������ �� ���� ���������� �� �����? ������ ���� � ����� dll ����� �������� �������� �� �� ����/���� - ��������, ����� LocalConnection.


--------------------
��������� � ������ ��������
 
+�������� � ������������ ������� ���������

�������� � ��� ����������� ����� ����
1 ���. ������ ��� ���� (������: 1, ������� �������������: 0)
�������������: 0

 

- ��������� ������ ������: 3.07.2014 - 07:18