Where im failing on native dll?

  • Автор темы Автор темы Spectre
  • Дата начала Дата начала

fatal error C1083: Cannot open include file: 'Core.h': No such file or directory
Hello everyone!
After heavy dig in I`am able to compile native dll using UE headers (yes, I modified it since LA2 use heavily modified Unreal Engine).

You need proper Core.lib, you must generate it from Core.dll of you LA2 client.
You need properly modified UE headers for Core (I`v attached mine).

Now you will be able to compile source code like this:
C++:
#include "NativeTestPrivate.h"

IMPLEMENT_PACKAGE(NativeTest);

IMPLEMENT_CLASS(UNatTest);

IMPLEMENT_FUNCTION(UNatTest, 1700, execNat2TestS);
IMPLEMENT_FUNCTION(UNatTest, 1701, execNat2TestI);

void
UNatTest::execNat2TestS (FFrame& Stack, RESULT_DECL)
{
    // input parameter handling
    guard(UNatTest::execNat2TestS);
    P_GET_STR(C);
    P_FINISH;
   
    const TCHAR* C2 = *C;
    std::wstringstream debugMessage;
    debugMessage << L"GET_STR=" << C2;
    MessageBox(nullptr, debugMessage.str().c_str(), L"hook", MB_OK);

    // return the result
    *(FString*)Result = TEXT("Hello from DLL");

    unguardexec;
}

void
UNatTest::execNat2TestI (FFrame& Stack, RESULT_DECL)
{
    // input parameter handling
    guard(UNatTest::execNat2TestI);
    P_GET_INT(A);
    P_FINISH;

    std::wstringstream debugMessage;
    debugMessage << L"GET_INT=" << A;
    MessageBox(nullptr, debugMessage.str().c_str(), L"hook", MB_OK);

    // return the result
    *(INT*)Result = A;

    unguardexec;
}

UScript class looks like this
Код:
class NatTest extends Object
    native;

native(1700) static final function string Nat2TestS(string A);
native(1701) static final function int Nat2TestI(int B);

defaultproperties
{
}

Working code somewere in interface
Код:
    res = class'NatTest'.static.Nat2TestI(32);
    AddSystemMessageString("From Dll=" $ res);
    res1 = class'NatTest'.static.Nat2TestS("Test from UC");
    AddSystemMessageString("From Dll=" $ res1);

Enjoy!
Ну так а предыдущий файл кто будет скачивать ?
 
Ну так а предыдущий файл кто будет скачивать ?
Как его правильно собирать?)

1>------ Build started: Project: NativeTest, Configuration: Release Win32 ------
1>Compiling...
1>NativeTest.cpp
1>d:\work\working\ue2_hdr\core\UnFile.h(452) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(462) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(484) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(494) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>Compiling manifest to resources...
1>Linking...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
1>LINK : fatal error LNK1181: cannot open input file 'Core.lib'
1>Build log was saved at "file://d:\Work\NativeTest\Release\BuildLog.htm"
1>NativeTest - 1 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

В опциях

Options > Linker > General > Additional Library Directories
D:\Work\Working\UT432\Core\Lib

У меня нет UT432\Core\Lib
 
Как его правильно собирать?)

1>------ Build started: Project: NativeTest, Configuration: Release Win32 ------
1>Compiling...
1>NativeTest.cpp
1>d:\work\working\ue2_hdr\core\UnFile.h(452) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(462) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(484) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>d:\work\working\ue2_hdr\core\UnFile.h(494) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
1>Compiling manifest to resources...
1>Linking...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
1>LINK : fatal error LNK1181: cannot open input file 'Core.lib'
1>Build log was saved at "file://d:\Work\NativeTest\Release\BuildLog.htm"
1>NativeTest - 1 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

В опциях

Options > Linker > General > Additional Library Directories
D:\Work\Working\UT432\Core\Lib

У меня нет UT432\Core\Lib
=) Вы не поверите но он есть в предыдущем архиве )
 
=) Вы не поверите но он есть в предыдущем архиве )
Если речь про Core.lib то его надо генерировать

You need proper Core.lib, you must generate it from Core.dll of you LA2 client.

Я сгенерировал и пишет
1>D:\Work\Working\UT432\Core\Lib\Core.lib : fatal error LNK1136: invalid or corrupt file

Может кто для теста дать любой core.lib?
 
Если речь про Core.lib то его надо генерировать

You need proper Core.lib, you must generate it from Core.dll of you LA2 client.

Я сгенерировал и пишет
1>D:\Work\Working\UT432\Core\Lib\Core.lib : fatal error LNK1136: invalid or corrupt file

Может кто для теста дать любой core.lib?
Не знаю чем вы генерировали но вот исходники Pubsurc легко гугляться
,
если уж не поможет, можно прямо с форума скачать исходники редактора карт, там уж вроде все есть и должно помочь .
 
Не знаю чем вы генерировали но вот исходники Pubsurc легко гугляться
,
если уж не поможет, можно прямо с форума скачать исходники редактора карт, там уж вроде все есть и должно помочь .
1>------ Build started: Project: NativeTest, Configuration: Release Win32 ------
1>Compiling...
1>NativeTest.cpp
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : warning C4346: 'TTypeInfo<T>::ConstInitType' : dependent name is not a type
1> prefix with 'typename' to indicate a type
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1362) : see reference to class template instantiation 'TMapBase<TK,TI>::TPair' being compiled
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1556) : see reference to class template instantiation 'TMapBase<TK,TI>' being compiled
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ')' before identifier 'InKey'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ';' before identifier 'InKey'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C3254: 'TMapBase<TK,TI>::TPair' : class contains explicit override 'ConstInitType' but does not derive from an interface that contains the function declaration
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2838: 'ConstInitType' : illegal qualified name in member declaration
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ';' before identifier 'InValue'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C3210: 'TTypeInfo<TI>' : access declaration can only be applied to a base class member
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2875: using-declaration causes a multiple declaration of 'TTypeInfoBase<T>::ConstInitType'
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(19) : see declaration of 'TTypeInfoBase<T>::ConstInitType'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2059: syntax error : ')'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2327: 'TMapBase<TK,TI>::TPair::Key' : is not a type name, static, or enumerator
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2065: 'InKey' : undeclared identifier
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C3861: 'Key': identifier not found
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2061: syntax error : identifier 'InValue'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2365: 'TMapBase<TK,TI>::TPair::Value' : redefinition; previous definition was 'data member'
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1366) : see declaration of 'TMapBase<TK,TI>::TPair::Value'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2143: syntax error : missing ';' before '{'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1362) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://d:\Work\NativeTest\Release\BuildLog.htm"
1>NativeTest - 19 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
1>------ Build started: Project: NativeTest, Configuration: Release Win32 ------
1>Compiling...
1>NativeTest.cpp
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : warning C4346: 'TTypeInfo<T>::ConstInitType' : dependent name is not a type
1> prefix with 'typename' to indicate a type
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1362) : see reference to class template instantiation 'TMapBase<TK,TI>::TPair' being compiled
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1556) : see reference to class template instantiation 'TMapBase<TK,TI>' being compiled
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ')' before identifier 'InKey'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ';' before identifier 'InKey'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C3254: 'TMapBase<TK,TI>::TPair' : class contains explicit override 'ConstInitType' but does not derive from an interface that contains the function declaration
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2838: 'ConstInitType' : illegal qualified name in member declaration
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2146: syntax error : missing ';' before identifier 'InValue'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C3210: 'TTypeInfo<TI>' : access declaration can only be applied to a base class member
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2875: using-declaration causes a multiple declaration of 'TTypeInfoBase<T>::ConstInitType'
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(19) : see declaration of 'TTypeInfoBase<T>::ConstInitType'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1367) : error C2059: syntax error : ')'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2327: 'TMapBase<TK,TI>::TPair::Key' : is not a type name, static, or enumerator
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2065: 'InKey' : undeclared identifier
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C3861: 'Key': identifier not found
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1368) : error C2061: syntax error : identifier 'InValue'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2365: 'TMapBase<TK,TI>::TPair::Value' : redefinition; previous definition was 'data member'
1> d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1366) : see declaration of 'TMapBase<TK,TI>::TPair::Value'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2143: syntax error : missing ';' before '{'
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1369) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>d:\work\working\ut432pubsrc\core\inc\UnTemplate.h(1362) : fatal error C1004: unexpected end-of-file found
1>Build log was saved at "file://d:\Work\NativeTest\Release\BuildLog.htm"
1>NativeTest - 19 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
возьми по проще реализацию

Для отрисовки этого пока хватит, но чтобы общаться с сервером ( да нужна вот эта версия)
 
возьми по проще реализацию

Для отрисовки этого пока хватит, но чтобы общаться с сервером ( да нужна вот эта версия)
А так ее собрать и подключить? Я тот то helloworld собрать не могу
CFF Explorer не импортирует
ScyllaHide не подключает
Extreme Injector v3 ошибку выдает.
 
А так ее собрать и подключить? Я тот то helloworld собрать не могу
CFF Explorer не импортирует
ScyllaHide не подключает
Extreme Injector v3 ошибку выдает.
Здесь пример =)
 
Здесь пример =)
Не работает

Ни CFF Explorer ни ScyllaHide

А Extreme Injector пишет Injection Success и убивает процесс L2
 
Что там подключать емае =)) ерунда
Так я ж прислал) у меня было сообщение injection success и процесс закрывается)) такой себе success

В общем меня уже другой вопрос волнует по поводу мувинга
 
  • Ха-ха-ха
Реакции: raz
Назад
Сверху