Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie] Wstrzykiwanie bibliotek w VC


Rekomendowane odpowiedzi

Opublikowano

mam problem

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(118) : error C2143: syntax error : missing ';' before 'if'

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(118) : error C2059: syntax error : 'if'

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(119) : error C2143: syntax error : missing ';' before '{'

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(53) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR'

1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(119) : error C2447: '{' : missing function header (old-style formal list?)

1>.\Hack by kasia1011.cpp(19) : fatal error C1004: unexpected end-of-file found

tyle blędów

no siema

Opublikowano

Co do tego błędu:

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia1011\hack by kasia1011\Form1.h(53) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR'

1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

 

Wciśnij ALT+F7 - wyświetli Ci się okno właściwości projektu. W zakładce "Configuration Properties->General" zmieniamy opcje "Character Set" z "Use Unicode character set" na "Use Multi-Byte character set".

 

Co do reszty, to musiałbym zobaczyć konkretnie linijki z błędnym kodem, bo same komunikaty niewiele mi mówią.

Opublikowano

Oto scener Timera:

48615778.jpg

 

96169678.jpg

 

24488044.jpg

 

63388886.jpg

Wciśnij ALT+F7 - wyświetli Ci się okno właściwości projektu. W zakładce "Configuration Properties->General" zmieniamy opcje "Character Set" z "Use Unicode character set" na "Use Multi-Byte character set".

Co do tego:

Sam zobacz

66687655.jpg

no siema

Opublikowano

Ok już mi nie potrzebna biblioteka mam problem z dodaniem funkcji scener projektuhackscener.jpg Errory:1>------ Build started: Project: Hack by kasia11, Configuration: Debug Win32 ------

1>Compiling...

1>Hack by kasai11.cpp

1>c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia11\hack by kasia11\hack by kasai11.cpp(66) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\daniel101\moje dokumenty\visual studio 2008\projects\hack by kasia11\hack by kasia11\hack by kasai11.cpp(24)' was matched

1>Build log was saved at "file://c:\Documents and Settings\Daniel101\Moje dokumenty\Visual Studio 2008\Projects\Hack by kasia11\Hack by kasia11\Debug\BuildLog.htm"

1>Hack by kasia11 - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Prosze O Pomoc

no siema

  • 4 miesiące temu...
Opublikowano

Siema mam do was sprawe probuje zrobic te wstrzykiwanie biblioteki ale pojawia mi sie 2 errory.

 

ponizej zamieszczam kody

 

#pragma once

 

#include <windows.h>

namespace Menu v1;

{

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using namespace System::Diagnostics;

 

 

 

/// <summary>

/// Summary for Form1

///

/// WARNING: If you change the name of this class, you will need to change the

/// 'Resource File Name' property for the managed resource compiler tool

/// associated with all .resx files this class depends on. Otherwise,

/// the designers will not be able to interact properly with localized

/// resources associated with this form.

/// </summary>

public ref class Form1 : public System::Windows::Forms::Form

{

public:

Form1(void)

{

InitializeComponent();

//

//TODO: Add the constructor code here

//

}

 

protected:

/// <summary>

/// Clean up any resources being used.

/// </summary>

~Form1()

{

if (components)

{

delete components;

}

}

 

private: Systm::Windows::Forms::Button

button1;void Menu v1()

{

HANDLE uWatku;

//char sciezkaBib[] = {"C:\\poligon2\\prop32.dll"};

char sciezkaBib[] = {"prop32.dll"};

void* adrBib;

DWORD uBibMod;

HMODULE uKernel32 = ::GetModuleHandle("Kernel32");

array<Process^>^gra = System::Diagnostics::Process::GetProcessesByName("WarRock");

HANDLE uProcesu = OpenProcess(PROCESS_ALL_ACCESS, FALSE, gra[0]->Id);

adrBib = ::VirtualAllocEx(uProcesu, NULL, sizeof(sciezkaBib),MEM_COMMIT, PAGE_READWRITE );

::WriteProcessMemory(uProcesu, adrBib, (void*)sciezkaBib, sizeof(sciezkaBib), NULL );

uWatku = ::CreateRemoteThread( uProcesu, NULL, 0,(LPTHREAD_START_ROUTINE) ::GetProcAddress( uKernel32,"LoadLibraryA" ),adrBib, 0, NULL );

::WaitForSingleObject( uWatku, INFINITE );

::GetExitCodeThread( uWatku, &uBibMod );

::CloseHandle( uWatku );

::CloseHandle( uProcesu ); //poprawione

::VirtualFreeEx( uProcesu, adrBib, sizeof(sciezkaBib), MEM_RELEASE );

}

protected:

private: System::Windows::Forms::Timer^ timer1;

private: System::ComponentModel::IContainer^ components;

 

private:

/// <summary>

/// Required designer varible.

/// </summary>

 

 

#pragma region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

void InitializeComponent(void)

{

this->components = (gcnew System::ComponentModel::Container());

this->button1 = (gcnew System::Windows::Forms::Button());

this->timer1 - (gcnew System::Windows::Forms::Button());

this->SuspendLaybut();

//

// button1

//

this->button1->Location = System::Drawing::Point(107,57);

this->button1->Name = L"button1";

this->button1->Size = System::Drawing::Size(94,34);

this->button1->TabIndex = 0;

this->button1->Text = L"zastrzyk";

this->button1->UseVisualStyleBackColor = true;

//

// timer1

//

this->timer1->Tick += gcnew System::EventHandler(this,&Form1::timer1_Tick);

//

// Form1

//

this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

this->ClientSize = System::Drawing::Size(284, 264);

this->Controls->Add(this->button1);

this->Name = L"Form1";

this->Text = L"Form1";

this->ResumeLayout(false);

 

}

#pragma endregion

private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {

{

timer1->Enabled = true;

}

if (wstrzykniety == false)

{

array<Process^>^aplikacja = System::Diagnostics::Process::GetProcessesByName("WarRock");

if (aplikacja->Length != 0)

{

zastrzyk();

wstrzykniety = true;

//Application::Exit();

}

}

 

}

 

 

------ Build started: Project: Menu v1, Configuration: Release Win32 ------

Compiling...

Menu v1.cpp

c:\users\młody\documents\visual studio 2008\projects\menu v1\menu v1\Form1.h(4) : error C2061: syntax error : identifier 'v1'

c:\users\młody\documents\visual studio 2008\projects\menu v1\menu v1\Form1.h(5) : error C2447: '{' : missing function header (old-style formal list?)

.\Menu v1.cpp(19) : fatal error C1004: unexpected end-of-file found

Build log was saved at "file://c:\Users\Młody\Documents\Visual Studio 2008\Projects\Menu v1\Menu v1\Release\BuildLog.htm"

Menu v1 - 3 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

2qtbevp.gif

18590.png

6201.gif

18706.png

18331.png

 

Pomogłem daj 5*

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...