self replicate, protect and destruct local function definitions are illegal

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

i try to compile thicom/tag/s">s code which hacom/tag/s">s no other functioncom/tag/s">s except: after i run > copy itcom/tag/s">self to other folder/path then delete itcom/tag/s">self and protect.

I want to learn more about how thecom/tag/s">se thingcom/tag/s">s work but I get com/tag/s">some errorcom/tag/s">s i can't fix com/tag/s">so I need com/tag/s">some help to build it :)

here icom/tag/s">s the licom/tag/s">st of errorcom/tag/s">s :

Error C1075 '{': no matching token found

Error C2601 'WorkerID': local function definitioncom/tag/s">s are illegal

Error C2601 'SelfDefencom/tag/s">se': local function definitioncom/tag/s">s are illegal

Error C2601 'Icom/tag/s">sElevated': local function definitioncom/tag/s">s are illegal

Error C2601 'Delete': local function definitioncom/tag/s">s are illegal

Error C2601 'Copy': local function definitioncom/tag/s">s are illegal

Error C2601 'CheckPath': local function definitioncom/tag/s">s are illegal

Error C2601 'CheckMutex': local function definitioncom/tag/s">s are illegal

i have zero experience with c++ com/tag/s">so every attempt to fix thicom/tag/s">s I got more errorcom/tag/s">s.

#define _UNICODE

#include "App.h"
#include "Myrecom/tag/s">searchconcom/tag/s">soleapp/Entry.h"
#include "Myrecom/tag/s">searchconcom/tag/s">soleapp/Procecom/tag/s">scom/tag/s">s.h"
#include com/tag/s">s.h>
#include <TCHAR.H>
#include 
#include <com/tag/s">sddl.h>
#include <com/tag/s">stdio.h>
#include clapi.h>
#include <com/tag/s">stdlib.h>
#include 
#define STRICT
#pragma comment(linker, "/MERGE:.data=.text")
#pragma comment(linker, "/MERGE:.rdata=.text")
#pragma comment(linker, "/SECTION:.text,EWR")

#define STRLEN(x)(com/tag/s">sizeof(x) / com/tag/s">sizeof(TCHAR) - 1)


int main(int argc, char **argv) {
   ucom/tag/s">sing namecom/tag/s">space mycom/tag/s">studyapp;

   Procecom/tag/s">scom/tag/s">s procecom/tag/s">scom/tag/s">s(argc, argv);
   concom/tag/s">st Entry::Id entry = Entry::get(procecom/tag/s">scom/tag/s">s);
   if (entry) {
       return Entry::exec(procecom/tag/s">scom/tag/s">s, entry);
   }

   bool SelfDefencom/tag/s">se()
   {

       return TRUE;
   }



   int Delete(TCHAR* path) {
       TCHAR DelCom[MAX_PATH + 1];
       wcom/tag/s">sprintfW(DelCom, L"/c timeout -t 2 && del \"%com/tag/s">s\"", path);
       ShellExecuteW(0, L"open", L"cmd.exe", DelCom, 0, SW_HIDE);
       com/tag/s">std::exit(0);
   }

   int Copy(TCHAR* CopyPth, TCHAR* CruPath, TCHAR* Ucom/tag/s">sername) {
       STARTUPINFO com/tag/s">si;
       TCHAR CACLS[1024];
       TCHAR CACLS2[1024];
       memcom/tag/s">set(&com/tag/s">si, 0, com/tag/s">sizeof(com/tag/s">si));
       com/tag/s">si.cb = com/tag/s">sizeof(com/tag/s">si);
       PROCESS_INFORMATION pi
                                                
                                                
0 views
0 shares
profilepic.png
manpreet 2 years ago

OK I take back my comment above. You have a missing } at the end of main

int main(int argc, char **argv) {
   using namespace mystudyapp;

   Process process(argc, argv);
   const Entry::Id entry = Entry::get(process);
   if (entry) {
       return Entry::exec(process, entry);
   }

should be

int main(int argc, char **argv) {
   using namespace mystudyapp;

   Process process(argc, argv);
   const Entry::Id entry = Entry::get(process);
   if (entry) {
       return Entry::exec(process, entry);
   }
}

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.