entry-point

Can a C# .dll assembly contain an entry point?

回眸只為那壹抹淺笑 提交于 2019-12-20 09:56:09
问题 My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be the only executable in the directory. In other words, I want it to "run" a .dll assembly not an .exe assembly. (I can require that the name of the .dll file being loaded into a new AppDomain be the same everytime, like Main.dll or something like

What was Wrong with void main()?

拈花ヽ惹草 提交于 2019-12-18 14:18:09
问题 Why has setting the entry point's return type to void in C++ always been discouraged, and was later removed by the standard and is prohibited by modern compilers? Why is it considered bad practice? Now, as I understand C# and Java both allow the entry point's return type to be void i.e static void main(String[] args) /* Java */ static void Main(string[] args) /* C# */ And C# and Java programmers do not consider it bad practice, they use it often in fact. Other languages which are (only

Can I do `ret` instruction from code at _start in MacOS? Linux?

大兔子大兔子 提交于 2019-12-18 08:29:40
问题 I am wondering if it is legal to return with ret from a program's entry point. Example with NASM: section .text global _start _start: ret ; Linux: nasm -f elf64 foo.asm -o foo.o && ld foo.o ; OS X: nasm -f macho64 foo.asm -o foo.o && ld foo.o -lc -macosx_version_min 10.12.0 -e _start -o foo ret pops a return address from the stack and jumps to it. But are the top bytes of the stack a valid return address at the program entry point, or do I have to call exit? Also, the program above does not

“does not contain a static 'main' method suitable for an entry point”

Deadly 提交于 2019-12-17 12:36:02
问题 I can't figure what's my wrong with my code below. When I try to compile I get the message: does not contain a static 'main' method suitable for an entry point. This is my code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace RandomNumberGenerator { public partial class Form1 : Form { private const int rangeNumberMin = 1; private const int

Why not call FreeLibrary from entry point function?

寵の児 提交于 2019-12-14 04:18:30
问题 I'm writing a DLL that needs to call a separate DLL dynamically multiple times. I would like to keep the callee loaded and then just unload it when my DLL is unloaded. But according to Microsoft, that's a bad idea. The entry point function should only perform simple initialization tasks and should not call any other DLL loading or termination functions. For example, in the entry point function, you should not directly or indirectly call the LoadLibrary function or the LoadLibraryEx function.

how to pass from an entrypoint to another with GWT?

隐身守侯 提交于 2019-12-13 18:02:44
问题 I want to developp a web application, but i have a problem in the creation of 2 web pages. I want to have an authentification page then i want to pass to the other one. I created 2 entrypoints and i want to call one page from the other. Anyone knows how to do it ? 回答1: I am assuming that you have created 2 web pages with 2 modules(2 entry points) and html pages included the specific modules. From your first page after authentication you can use Window.Location.replace("your page path to

Why I cannot use as entry point in C# app a generic type?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 09:36:10
问题 In C# the method Main must be in a nongeneric type in order to be selected as entry point. Why is that? I'm a little bit confused about that because that is possible in Java (the function main() can be in a generic class). namespace ConsoleApplication { class Program<T> //incorrect { static void Main(string[] args) { } } } 回答1: The Main method serves as a fixed interface to the operating system, which itself has no mechanism to select and specify a type to be given as a parameter. 来源: https:/

How do you make an entry point to a script in a virtual environment available system-wide?

醉酒当歌 提交于 2019-12-13 03:18:02
问题 I'm using setuptools for python packaging where I define console script entry points the usual way in the setup.py file: setup.py # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup(... name='my_project', entry_points={'console_scripts':['my_entry_name=my_package.scripts.my_python_script:main' ]}, ... ) After installing the package, I can call this entry point from a batch file like this: my_CURRENT_batch_file.command #!/bin/bash cd "$(dirname "$0")" # set the working

How to execute the Entrypoint of a Docker images at each “exec” command?

旧城冷巷雨未停 提交于 2019-12-12 10:34:53
问题 After trying to test Dockerfiles with Dockerspec, I finally had an issue I can't resolve properly. The problem is, I think, from Docker itself ; If I understand its process, an Entrypoint is only executed at run , but if the container stay started and I launch an "exec" command in, it's not re-called. I think it's the wanted behavior. But if the Entrypoint is a "gosu" script which precede all my commands, it's a problem... Example "myImage" has this Entrypoint : gosu 1000:1000 "$@" If I

The procedure entry point axiom_attribute_create could not be located in the dynamic link library

我只是一个虾纸丫 提交于 2019-12-12 01:46:31
问题 I have a project in c and I want to compile it in CodeBlocks with MinGW. I tried to link its needed libraries but I got undefined reference error so I searched and found out that the libraries that I was using was compiled with MVC++ and cannot be used with MinGW. (I am not an expert in c, so I'm a little bit confused.) I found This link and did what they said in order to solve my problem. I have created axis2c .a files from the original axis2c .dll files. I created .def files with reimp then